Search
⌘K
Get Premium
Leetcode 1602. Find Nearest Right Node in Binary Tree
Given a binary tree and a target node, return the node immediately to the right of the target on the same depth (or null if none). This is typically solved with a level-order traversal (BFS) to locate the target within its level and return the next node in that level.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.