from bynary_search_tree import BST
from helpers import validateBst
from traversals import inorder_traverse, postorder_traverse, preorder_traverse

lst = []
tree = BST(3)
tree.insert(1)
tree.insert(5)
tree.insert(-5)
tree.insert(2)
# tree.insert(5).insert(2).insert(1)
# tree.insert(5)
# tree.insert(15)
# tree.insert(22)
# tree.insert(3)
print("In-order traverse:\n", inorder_traverse(tree, lst))
lst.clear()
print("Post-order traverse:\n", postorder_traverse(tree, lst))
lst.clear()
print("Pre-order traverse:\n", preorder_traverse(tree, lst))
print(validateBst(tree))
lst.clear()
tree.remove(1)
tree.remove(3)
print("In-order traverse:\n", inorder_traverse(tree, lst))
lst.clear()
print("Post-order traverse:\n", postorder_traverse(tree, lst))
lst.clear()
print("Pre-order traverse:\n", preorder_traverse(tree, lst))
lst.clear()
print(validateBst(tree))
