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?
Does the BST in this problem include duplicate nodes?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.