[1, #, 7, 3, 9]
I thought above will be a valid BST. But it's not. why not?
As cipherbowen pointed out:
[1, null, 7, 3, 9] is a valid BST.
[1, #, 7, 3, 9] is NOT a valid BST.
So I am still confused.
Should be valid. Is your input correct?
Run Code Result: Your input [1,null,7,3,9] Your answer true Expected answer true
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.