Hash Table
1261. Find Elements in a Contaminated Binary Tree
A "contaminated" tree has all values −1; the recovery rule is root = 0, and a node with value v has left child 2v+1, right child 2v+2. Build a structure that recovers the tree in the constructor and…
Loading…