Python easy to understand deque solution
\nclass Solution(object):\n    def zigzagLevelOrder(self, root):\n        deque = collections.deque()\n        if root:\n            deque.append(root)\n       
```\nclass Solution(object):\n    def zigzagLevelOrder(self, root):\n        deque = collections.deque()\n        if root:\n            deque.append(root)\n        res, level = [], 0\n        while deque:\n            l, size = [], len(deque)\n            for _ in range(size): # process level by level\n                node = deque.popleft()\n                l.append(node.val)\n                if node.left:\n                    deque.append(node.left)\n                if node.right:\n                    deque.append(node.right)\n            if level % 2 == 1:\n                l.reverse()\n            res.append(l)\n            level += 1\n        return res\n```
['Breadth-First Search', 'Queue', 'Python']