Why are we given preorder and inorder and not just one?

  • 0

    Why are they given together? They will both have the same values just in different orders...

  • 0

    I had a same question and it seems it is not BST, so you cannot build it based on only one of traversal arrays.

Log in to reply

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