Easy to understand (Python Code)
\n    def zigzagLevelOrder(self, root: Optional[TreeNode]) -> List[List[int]]:\n        if root is None:\n            return\n        myqueue=queue.Queue()\n   
```\n    def zigzagLevelOrder(self, root: Optional[TreeNode]) -> List[List[int]]:\n        if root is None:\n            return\n        myqueue=queue.Queue()\n        myqueue.put(root)\n        myqueue.put(None)\n        final=[]\n        small=[]\n        left2right=True\n        while myqueue.empty()==False:\n            front=myqueue.get()\n            if front is not None:\n                if front.left!= None:\n                    myqueue.put(front.left)\n                if front.right!=None:\n                    myqueue.put(front.right)    \n                small.append(front.val)\n            else:\n                if myqueue.empty()==True:\n                    if left2right:\n                        final.append(small)\n                    else:\n                        final.append(small[-1::-1])\n                    break\n                else:\n                    if left2right:\n                        final.append(small)\n                        left2right=False\n                    else:\n                        rev=small[-1::-1]\n                        final.append(rev)\n                        left2right=True\n                    small=[]\n                    myqueue.put(None)\n        return final            \n                    \n```
['Queue', 'Binary Tree', 'Python']