Is it a Search Tree?
Premium Content - Free Preview
Given a binary tree, can you determine if it is a proper Binary Search Tree?
In a binary search tree, every descendant to the right of node P must be greater than P, and every descendant to the left of P must be less than P.
The input will be given as a list, as discussed in Trees.
End of Free Content Preview. Please Sign in or Sign up to buy premium content.
Comments
Panashe Fundira
Jun 17, 11:23 AMit was a good challenge figuring out how to do this with the array representation, very satisfied to have solved it