Simple | Easily Understandable
Code\njava []\nclass Solution {\n    public List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        ArrayList<Integer>ans=new ArrayList<>();\n
# Code\n```java []\nclass Solution {\n    public List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        ArrayList<Integer>ans=new ArrayList<>();\n        int small=(4*cheeseSlices-tomatoSlices)/2;\n        int jumbo=cheeseSlices-small;\n    if(tomatoSlices%2==0 && small>=0 && jumbo>=0){\n     ans.add(jumbo);\n     ans.add(small);  }\n     return ans;\n    }\n}\n```
['Math', 'Java']