def main(): """ """ sorted_array = sorted([1, 2, 5, 621, 23, 24]) root = get_binary_tree(sorted_array)
def main(): """ """ sorted_array = sorted([1, 2, 5, 621, 23, 24, 4]) root = get_binary_tree(sorted_array) print("is_bst = {}".format(is_bst(root)))
def main(): """ """ sorted_array = sorted([1, 2, 5, 621, 623]) root = get_binary_tree(sorted_array) print(root)
def main(): """ """ sorted_array = sorted([1, 2, 3, 4, 5, 6]) root = get_binary_tree(sorted_array) print(get_combo([root]))
def main(): """ """ sorted_array = sorted([1, 2, 5, 621, 23, 24]) root = get_binary_tree(sorted_array) is_balanced_, depth = is_balanced(root) # debug print("is_balanced_ = {}".format(is_balanced_))
def main(): """ """ sorted_array = sorted([1, 2, 3, 5, 621, 81, 23]) root = get_binary_tree(sorted_array) print(root) print(linked_list_depth(root)) print(linked_list_depth2(root))
def main(): """ """ sorted_array = sorted([1, 2, 5, 621, 23, 24, 4, 3, 2.1, 30, 31]) # debug print("root = {}".format(sorted_array)) root = get_binary_tree(sorted_array) # debug print("root = {}".format(root)) root.left.left.right.right = BinNode(2.001) root.left.left.right.right._parent = root.left.left.right print((root.right.right.right))