Solution in O(1) Space and Time , Simple Maths
Intuition\n Describe your first thoughts on how to solve this problem. \nLooks like linear equation in two variable question.\n# Approach\n Describe your approa
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nLooks like linear equation in two variable question.\n# Approach\n<!-- Describe your approach to solving the problem. -->\nMake equations, X + Y = CheeseSlices and 4X + 2Y = tomatoslices, where X is the number of jumbo burger and Y is the number of small burgers.\n# Complexity\n- Time complexity:O(1)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```python3 []\nclass Solution:\n    def numOfBurgers(self, tomatoSlices: int, cheeseSlices: int) -> List[int]:\n        x = (tomatoSlices - 2*cheeseSlices) // 2\n        y = cheeseSlices - x\n\n        return [x,y] if x >= 0 and y >= 0 and x + y == cheeseSlices and 4*x + 2*y == tomatoSlices else []\n\n```
['Math', 'Python3']