solving using linear equation
\nclass Solution(object):\n    def numOfBurgers(self, tomatoSlices, cheeseSlices):\n        y = (4*cheeseSlices - tomatoSlices)\n        if y%2==0 and y>=0:\n  
```\nclass Solution(object):\n    def numOfBurgers(self, tomatoSlices, cheeseSlices):\n        y = (4*cheeseSlices - tomatoSlices)\n        if y%2==0 and y>=0:\n            y/=2\n            if(cheeseSlices-y>=0):\n                return [cheeseSlices-y, y]\n        return []\n```
[]