Does the BST in this problem include duplicate nodes?

  • 1

    As far as I know, there are more than one definition of BST, the differences of which are mainly about duplicate nodes.
    Does the BST include duplicate nodes? If it does, place the duplicate nodes to the left child or the right child?

  • 0

    Yes, it is a great question in a real interview. And, in LeetCode, this is no duplicated node.

Log in to reply

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