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.
This case should return False. min and max value should be tracked. For example, all childs below 20 should be below 18 because 20 is right child of 18(root). 18 on the bottom should be >18 (root) and <20. But this is not satisfied, and False returns.
My interface for python3. (I deleted full code example.)
Is This a Binary Search Tree?
You are viewing a single comment's thread. Return to all comments →
Yes.
This case should return
False
. min and max value should be tracked. For example, all childs below20
should be below18
because20
is right child of18(root)
.18
on the bottom should be >18 (root)
and <20
. But this is not satisfied, and False returns.My interface for python3. (I deleted full code example.)