Construct tree from parent-child pairs and find specific nodes
Filed under Grab
The question
Construct a binary tree given pairs of parent-to-child nodes, and find all nodes with one child or no child.
No write-up yet. Related questions below have one.
Related Grab questions
Collected from public candidate posts and coding forums. Updated Nov 2026.