You are viewing a single comment's thread. Return to all comments →
Actually your code does not work. I agree it passes the tests, but it fails with this user input: can you try with this tree: 10 9 11 8 11
as 11 is a duplicate it should say "NO", but your code does not consider this.
Seems like cookies are disabled on this browser, please enable them to open this website
Trees: Is This a Binary Search Tree?
You are viewing a single comment's thread. Return to all comments →
Actually your code does not work. I agree it passes the tests, but it fails with this user input: can you try with this tree: 10 9 11 8 11
as 11 is a duplicate it should say "NO", but your code does not consider this.