Can't understand the test case for Binary tree longest consecutive sequence

  • 0

    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 = 2
    i + 2

    If this is the case, who is the parent of 2,4 ?

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.