Simple java solution, 0ms,100 Faster, using queue, bfs
\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNode right;\n *     TreeNode(int x)
```\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNode right;\n *     TreeNode(int x) { val = x; }\n * }\n */\nclass Solution {\n    public List<List<Integer>> zigzagLevelOrder(TreeNode root) {\n        List<List<Integer>> op = new LinkedList<>();\n        if(root==null){\n            return op;\n        }\n        Queue<TreeNode> queue = new LinkedList<>();\n        queue.add(root);\n        boolean odd=true;\n        while(!queue.isEmpty()) {\n           int size = queue.size();\n           LinkedList<Integer> res = new LinkedList<>();\n           for(int i=1;i<=size;i++){\n               TreeNode node = queue.poll();\n               if(odd){\n                   res.add(node.val);   \n               } else {\n                   res.addFirst(node.val);\n               }\n               if(node.left!=null) {\n                       queue.add(node.left);\n               }\n            if(node.right!=null){\n                        queue.add(node.right);\n                   }\n               \n           }\n            op.add(res);\n            odd=!odd;\n        }\n        return op;\n    }\n}\n```
['Breadth-First Search', 'Queue', 'Java']