You are viewing a single comment's thread. Return to all comments →
really nice! I think Python's chain comparisons are underappreciated:
def check_node(node, Min, Max): if not node: return True if Min < node.data < Max: return check_node(node.left, Min, node.data) and check_node(node.right, node.data, Max) return False
Seems like cookies are disabled on this browser, please enable them to open this website
Is This a Binary Search Tree?
You are viewing a single comment's thread. Return to all comments →
really nice! I think Python's chain comparisons are underappreciated: