Testcase wrong ?


  • 0
    A

    Hi,

    The answer for the following test case is 2 but I can't see why. I think it should be 4

    [2,1,3,null,4]

    The entire tree seems to be a BST. Could someone please let me know where I'm wrong ?

    Thanks!


  • 2

    4 is left of 2, so it's not a BST.


Log in to reply
 

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