Java Maths Approach 3 liner
We can use only one cheese slice in each of the burgers we make. which means we need to have cheese slice number of burgers. We then have to check if there is a
We can use only one cheese slice in each of the burgers we make. which means we need to have cheese slice number of burgers. We then have to check if there is a way to break the tomato slices in such a way that the total count is equal to the number of cheese slices.\n```\nclass Solution {\n    public List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n\n        for(int i = 0; i <= cheeseSlices; i++) {\n            if( 2 * i + 4 * (cheeseSlices - i) == tomatoSlices) {\n                return Arrays.asList(cheeseSlices - i, i);\n            }\n        }\n        return new ArrayList<>();\n    }\n}
[]