You are viewing a single comment's thread. Return to all comments →
What's wrong with this code guys. This is failing 6 test cases
if root.left or root.right: if root.left: if root.left.data < root.data: foundl = 1 else: foundl = 0 if root.right: if root.right.data > root.data: foundr = 1 else: foundr = 0 return foundl * foundr * check_binary_search_tree_(root.left) * check_binary_search_tree_(root.right) else: return 1
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Is This a Binary Search Tree?
You are viewing a single comment's thread. Return to all comments →
What's wrong with this code guys. This is failing 6 test cases