Find immediate right sibling or cousin in a binary tree
Filed under Microsoft IDC
The question
Given a binary tree where nodes contain a pointer to their parent, find the immediate right sibling or cousin of a given node.
No write-up yet. Related questions below have one.
Related Microsoft IDC questions
Collected from public candidate posts and coding forums. Updated Nov 2026.