Available question text
Given counts of tomato and cheese slices, find nonnegative integers (jumbo, small) so that 4*tomatoes_per_jumbo+2*tomatoes_per_small equals tomatoSlices and jumbo+small equals cheeseSlices, or return [] if impossible. This reduces to a simple linear Diophantine check: tomatoSlices must be even and 2*cheeseSlices <= tomatoSlices <= 4*cheeseSlices, yielding jumbo = tomatoSlices/2 - cheeseSlices and small = cheeseSlices - jumbo.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1276. Number of Burgers with No Waste of Ingredients
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source