Boundary of Binary Tree
Medium
Tree Traversals (Advanced)
Print the boundary of a binary tree in anti-clockwise order starting from the root: the left boundary (excluding leaves), then all leaves left to right, then the right boundary in reverse (excluding leaves).
Constraints
1 <= number of nodes <= 10^4
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.