[JAVA] easy solution with level order traversal using queue.
I traverse by level using queue.\nFor even level elements are reversed and the other uses original order.\n\n\nclass Solution {\n    public static List<List<Int
I traverse by level using queue.\nFor even level elements are reversed and the other uses original order.\n\n```\nclass Solution {\n    public static List<List<Integer>> zigzagLevelOrder(TreeNode root) {\n        List<List<Integer>> res = new ArrayList<>();\n        if(root == null) return res;\n        \n        Queue<TreeNode> queue = new LinkedList<>();\n        queue.offer(root);\n        int level = 0; // the number of level !!\n        while(!queue.isEmpty()) {\n            List<Integer> list = new ArrayList<>();\n            int size = queue.size();\n            for(int i=0; i<size; i++) {\n                TreeNode node = queue.poll();\n                list.add(node.val);\n                if(node.left != null) queue.offer(node.left);\n                if(node.right != null) queue.offer(node.right);\n            }\n            if(level % 2 == 1) { //reverse data\n                Collections.reverse(list);\n            }\n            res.add(list);\n\n            level++; // after traverse all member of element in same level, go next level\n        }\n        return res;\n    }\n}\n```
['Queue', 'Java']