very easy greedy approach in c++
class Solution {\npublic:\n    vector numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        if(tomatoSlices%2!=0)\n            return {};\n        else \n
class Solution {\npublic:\n    vector<int> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        if(tomatoSlices%2!=0)\n            return {};\n        else \n        {\n            int k=(tomatoSlices/2-cheeseSlices);\n                if(k<0)\n                    return {};\n            int p=(cheeseSlices-k);\n                if(p<0)\n                    return {};\n            return {k,p};\n        }\n    }\n};
['Greedy', 'C', 'C++']