C++ (2 Linear Equations in 2 Variables)
Let the number of jumbo burgers and small burgers that will be our answer be x and y respectively. Now, the tomato slices and cheese slices used in each of our 
Let the number of jumbo burgers and small burgers that will be our answer be x and y respectively. Now, the tomato slices and cheese slices used in each of our burgers will be:\n\n**Jumbo Burger**\n\tTomato Slices = 4*x\n\tCheese Slices = x\n\t\n**Small Burger**\n\tTomato Slices = 2*y\n\tCheese Slices = y\n\t\nNow, for no wastage of ingredients, the number of tomato slices and cheese slices used must be equal to the available number of tomato slices and cheese slices respectively. Therefore, the following 2 equations must hold:\n\n\t4*x + 2*y = tomatoSlices\n\tx + y = cheeseSlices\n\t\nSolving for x and y gives us:\n\n\tx = tomatoSlices/2 - cheeseSlices\n\ty = 2*cheeseSlices - tomatoSlices/2\n\t\nFor our answers to be valid, both x and y must not be negative as well as fractional. For integral answers, tomatoSlices/2 must be an integer, which is only possible when tomatoSlices is divisible by 2. For non-negative answers, we will compute x and y and check if they are both positive. If they are, we will return them as the answer.\n\n```\nclass Solution {\npublic:\n    vector<int> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        vector<int> result;\n        if(tomatoSlices%2 == 0)\n        {\n            int x = tomatoSlices/2 - cheeseSlices;\n            int y = 2*cheeseSlices - tomatoSlices/2;\n            if(x>=0 && y>=0)\n            {\n                result.push_back(x);\n                result.push_back(y);\n            }\n        }\n        \n        return result;\n    }\n};\n```
[]