Binary Tree Zigzag Level Order Traversal
Try to solve the Binary Tree Zigzag Level Order Traversal problem.
We'll cover the following
Statement
Given a binary tree, return its zigzag level order traversal. The zigzag level order traversal corresponds to traversing nodes from left to right for one level, and then right to left for the next level, and so on, reversing direction after every level.
Constraints:
-
The number of nodes in the tree is in the range to .
-
node.data
Examples
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy