Perform a border traversal of a complete binary tree efficiently in a single traversal, collecting the boundary nodes (left boundary, leaves, and right boundary) in counter-clockwise direction.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.