Spiral or Zigzag Traversal in a Binary Tree
The following visuals will give you an idea about how the spiral or zigzag order traversal looks like. This traversal is based on Level order traversal. We need to keep track of the nodes in each level to display accordingly. As we can see above, tracking each level is very important during this traversal. Approach …
Read More Spiral or Zigzag Traversal in a Binary Tree