In a binary tree, whenever a node has exactly one child, delete the child and add its value to the node, taking over its children. A chain 1 → 2 → 3 becomes a single node 6. A Waymo senior phone screen.
In a binary tree, whenever a node has exactly one child, delete the child and add its value to the node, taking over its children. A chain 1 → 2 → 3 becomes a single node 6. A Waymo senior phone screen.
The discussion opens with the full question.