Skip to main content
Admissions guidance, study banks, and career tools โ€” get started on Shalyam

Zigzag Level Order Traversal

Medium Binary Trees

Print the zigzag level order of a binary tree: left to right on the first level, right to left on the next, and so on. One level per line.

Constraints

0 <= number of nodes <= 2000

Discussion

No discussions yet.

Rewards ยท v2.1

Join Shalyam Newsletter

Get exclusive insights with every issue: education, research and innovation news.

One email a week. Unsubscribe any time.