Leetcode 545. Boundary of Binary Tree
Return the boundary of a binary tree: list nodes on the left boundary top-down (excluding leaves), then all leaves left-to-right, then the right boundary bottom-up (excluding leaves), avoiding duplicates. The challenge is to traverse and partition nodes correctly (including edge cases like single-node or skewed trees) while preserving the required order.
Asked at:

Amazon
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early October, 2025

Amazon
Mid-level
Mid September, 2025
Meta
Senior
Slight variation where leaves of the binary tree are not included.
Early July, 2025
Meta
Senior
Sum Root to Leaf Numbers for Binary Tree
Your account is free and you can post anonymously if you choose.