We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
My code should return a false for this tree...Are you getting a different result? If you traverse these nodes in In order you get 1->2->4->3->5->6->7 which is clearly not sorted as 4 is greater than 3.
Trees: Is This a Binary Search Tree?
You are viewing a single comment's thread. Return to all comments →
My code should return a false for this tree...Are you getting a different result? If you traverse these nodes in In order you get 1->2->4->3->5->6->7 which is clearly not sorted as 4 is greater than 3.