Java Solution (Two Solutions)
Checking all the possible solutions\nRuntime : 497ms\n\npublic List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        boolean cond1 = (tomato
**Checking all the possible solutions**\nRuntime : **497ms**\n```\npublic List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        boolean cond1 = (tomatoSlices == 0 && cheeseSlices !=0) || (tomatoSlices != 0 && cheeseSlices ==0);\n        boolean cond2 = (tomatoSlices < cheeseSlices);\n        boolean cond3 = (tomatoSlices%2 == 1);\n        if(cond1 || cond2 ||  cond3){\n            return new ArrayList<>();\n        }\n        int low = 0;\n        int high = cheeseSlices;\n        while(low <= cheeseSlices){\n            int Jumbo_Burger = 4*low;\n            int Small_Burger = 2*high;\n            if(Jumbo_Burger + Small_Burger == tomatoSlices){\n               return Arrays.asList(low,high);\n            }\n            low++;\n            high--;\n        }\n        \n        //if not above then there is no answer\n        return new ArrayList<>();\n    }\n```\n\n**Simple Math**\n**Run Time : 1ms**\n```\npublic List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        //Jumbo Burger = (tomatoSlices/2) - cheeseSlices;\n        //Jumbo Burger + Small Burger = cheeseSlices\n        \n        //check for even tomatoes\n        if(tomatoSlices %2 == 1){\n            return new ArrayList<>();\n        }\n        int Jumbo_Burger =  (tomatoSlices/2) - cheeseSlices;\n        \n        //check for Jumbo_Burger\n        if(Jumbo_Burger <0 || Jumbo_Burger > cheeseSlices){\n             return new ArrayList<>();\n        }\n        int Small_Burger = cheeseSlices - Jumbo_Burger;\n        return Arrays.asList(Jumbo_Burger,Small_Burger);\n    }\n```
['Java']