✅ JAVA solution
Code\nJAVA []\npublic class Solution {\n    public List<List<Integer>> zigzagLevelOrder(TreeNode root) \n    {\n        List<List<Integer>> sol = new ArrayList<
# Code\n``` JAVA []\npublic class Solution {\n    public List<List<Integer>> zigzagLevelOrder(TreeNode root) \n    {\n        List<List<Integer>> sol = new ArrayList<>();\n        travel(root, sol, 0);\n        return sol;\n    }\n    \n    private void travel(TreeNode curr, List<List<Integer>> sol, int level)\n    {\n        if(curr == null) return;\n        \n        if(sol.size() <= level)\n        {\n            List<Integer> newLevel = new LinkedList<>();\n            sol.add(newLevel);\n        }\n        \n        List<Integer> collection  = sol.get(level);\n        if(level % 2 == 0) collection.add(curr.val);\n        else collection.add(0, curr.val);\n        \n        travel(curr.left, sol, level + 1);\n        travel(curr.right, sol, level + 1);\n    }\n}\n```\n\n![kitty.jpeg](https://assets.leetcode.com/users/images/4b501662-d825-408e-b0c1-dae2ae5b2132_1676786757.2180564.jpeg)\n
['Java']