How is this test case valid
I am under the following assumption about the above binary tree representation
left child = 2i + 1 where i is parent
right child = 2i + 2
If this is the case, who is the parent of 2,4 ?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.