Top View of a Binary Tree
Medium
Binary Trees
Print the nodes visible when the tree is seen from above, from the leftmost to the rightmost column. If several nodes share a column, the one closest to the root is visible.
Constraints
1 <= number of nodes <= 10^5
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.