Easy Java Solution
IntuitionEach Jumbo Burger requires 4 tomato slices and 1 cheese slice.Each Small Burger requires 2 tomato slices and 1 cheese slice.We need to determine how ma
# Intuition
Each Jumbo Burger requires 4 tomato slices and 1 cheese slice.

Each Small Burger requires 2 tomato slices and 1 cheese slice.

We need to determine how many Jumbo and Small burgers can be made such that:

The total tomato slices used is exactly tomatoSlices.

The total cheese slices used is exactly cheeseSlices.

Mathematical Representation
Let:

x be the number of Jumbo Burgers.

y be the number of Small Burgers.

4x+2y=tomatoSlices

x+y=cheeseSlices

# Approach
<!-- Describe your approach to solving the problem. -->
x and y must be non-negative (i.e., x >= 0 and y >= 0).

tomatoSlices must be between 2 * cheeseSlices and 4 * cheeseSlices (since each cheese slice contributes 2-4 tomatoes).

tomatoSlices must be overall an even number



# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {
        int jumbo = (tomatoSlices - (cheeseSlices*2))/2;
        int small = cheeseSlices - jumbo;

        if((jumbo >= 0 && small >=0) && (tomatoSlices >= 2*cheeseSlices) && (tomatoSlices %2 == 0)){
            return Arrays.asList(jumbo, small);
    
        }
        else
            return new ArrayList<>();
    }
}
```
['Java']