• + 2 comments

    Index 1 and the value of the root are not the same. Binary tree root can contain any value. That part of the problem declaration is ambiguous. For example:

           5
         /   \
        3     2
       / \   / \
      10  6 9  17
    

    Is still a binary tree. It's not sorted, but that does not disqualify it as a binary tree.