Ejemplo n.º 1
0
def test_breadth_first_traversal(blncd_tree):
from bst import BST
    bst = BST()
    assert bst.bst_post_order_traversal() == [50, 30, 70, 20, 40, 60, 90, 15, 25, 35, 45, 55, 65, 80, 100]
Ejemplo n.º 2
0
def test_post_order_traversal(blncd_tree):
    """Test post order."""
    from bst import BST
    bst = BST()
    assert bst.bst_post_order_traversal() == [15, 25, 20, 35, 45, 40, 30, 55, 65, 60, 80, 100, 90, 70]