Given the
root
of a binary tree, return the
zigzag
level order traversal of its nodes' values. The zigzag traversal is done from left to right, then right to left for the next level and alternate between.
Example
Input: Given binary tree [5,8,2,null,null,6,4]
5
/ \
8 2
/ \
6 4
Output: Return its zigzag level order traversal as:
[
[5],
[2,8],
[6,4]
]