[Python3] Clean Solution using Queue Level Order Traversal
\nclass Solution:\n    def zigzagLevelOrder(self, root):\n        \n        res = []\n        if not root: return res\n        zigzag = True\n        \n        
```\nclass Solution:\n    def zigzagLevelOrder(self, root):\n        \n        res = []\n        if not root: return res\n        zigzag = True\n        \n        q = collections.deque()\n        q.append(root)\n        \n        while q:\n            n = len(q)\n            nodesOfThisLevel = []\n            \n            for i in range(n):\n                node = q.popleft()\n                nodesOfThisLevel.append(node.val)\n                \n                if node.left: q.append(node.left)\n                if node.right: q.append(node.right)\n                    \n            if zigzag:\n                res.append(nodesOfThisLevel)\n                zigzag = False\n            else:\n                res.append(nodesOfThisLevel[::-1])\n                zigzag = True\n        \n        return res\n    \n# Time: O(N)\n# Space: O(N)\n```
['Queue', 'Python', 'Python3']