Algorithm · Meta · Medium
Given a binary tree's root, return an integer list made up of: nodes on the left edge, listed from the leaf upward; nodes on the right edge, listed from the root downward. Boundary definition: To form the left edge, begin at the root and repeatedly follow the left child when available; otherwise, follow the right child. Continue until reaching a leaf, recording the outermost node at every depth. To form the right edge, begin at the root and repeatedly choose the right child…
Checking your access…