[Python] Solution with step by step explanation
Algorithm -\nCheck if we have extra cheeseSlices or tomatoSlices, if so return [], else calculate the below values\n\n1. Assume all to be small burgers and calc
**Algorithm -**\nCheck if we have extra cheeseSlices or tomatoSlices, if so return [], else calculate the below values\n\n1. Assume all to be small burgers and calculate the remaining tomatoSlices\n2. No of jumbo burgers will be half of the remaining tomatoSlices\n3. Reduce this no from the calculated small burgers\n4. If the ramaining tomatoSlices is 0, return the calculated answers\n5. Else return []\n\n\n\n**Python**\n```\nclass Solution:\n    def numOfBurgers(self, tomatoSlices: int, cheeseSlices: int) -> List[int]:\n        res = [0]*2\n        \n        # If we don\'t have anything, we can make 0 jumbo and small burgers.\n        if tomatoSlices == 0 and cheeseSlices == 0:\n            return [0, 0]\n        \n        # If we dont have enough tomatoSlices to make all small burgers\n        if tomatoSlices < 2*cheeseSlices:\n            return []\n        \n        # If we dont have enough cheeseSlices to make all jumbo burgers\n        elif tomatoSlices > 4*cheeseSlices:\n            return []\n        \n        # Assume all are made as small burgers\n        tomatoSlices -= 2*cheeseSlices\n        \n        # Make jumbo with remaining tomatoSlices\n        jumbo = tomatoSlices//2\n        # Subtract the no of cheeseSlices used for making jumbo from the small burgers\n        small = cheeseSlices - tomatoSlices//2\n        \n        # If we have still some tomatoSlices left (In case of odd no of slices)\n        if tomatoSlices - (tomatoSlices//2)*2 > 0:\n            return []\n        \n        print(tomatoSlices, jumbo, small)\n        \n        return [jumbo, small]\n\n```
[]