Ejemplo n.º 1
0
def main():
    b = BinaryTree(1)
    """
        You can add a for loop here to create as many childs as you want. 
    """
    b.insertLeft(2)
    b.insertRight(3)

    print("\nInorder Traversal: L,Root,R")
    inorderTraversal(b)
    print("\nPre Order Traversal: Root,L,R")
    preOrderTraversal(b)
    print("\nPost Order Traversal: L, R, Root")
    postOrderTraversal(b)