BEGINNER FRIENDLY JAVA CODE || BEATS 100% complexity
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public List<Integer> numOfBurgers(int tomatoSlices, int cheeseSlices) {\n        List<Integer> ans=new ArrayList<>();\n        if(tomatoSlices%2==1)\n        {\n            return ans;\n        }\n        int x=tomatoSlices/2-cheeseSlices;\n        int y=cheeseSlices-x;\n        if(x<0 || y<0)\n        {\n            return ans;\n        }\n        ans.add(x);\n        ans.add(y);\n        \n        return ans;\n    }\n}\n```
['Java']