← ALL NOTES
Linked List

117. Populating Next Right Pointers in Each Node II

Gaps are what break the perfect-tree rules from #116: a node's right neighbour on the level below might be any descendant of a later node, not the tidy curr->next->left. The bulletproof answer is…

Loading…