public Iterable<Key> preOrder()
private Iterable<Key> preOrder(Node x, Queue<Key> q)
public Iterable<Key> postOrder()
private Iterable<Key> postOrder(Node x, Queue<Key> q)
public Iterable<Key> inOrder()
private Iterable<Key> inOrder(Node x, Queue<Key> q)
public Iterable<Key> levelOrder()
echo "H E L L O W O R L D" | java BST
PRE-ORDER
H 0
E 1
D 9
L 8
O 6
W 5
R 7
POST-ORDER
IN-ORDER
LEVEL-ORDER
Tree Traversals
public Iterable<Key> preOrder()
private Iterable<Key> preOrder(Node x, Queue<Key> q)
public Iterable<Key> postOrder()
private Iterable<Key> postOrder(Node x, Queue<Key> q)
public Iterable<Key> inOrder()
private Iterable<Key> inOrder(Node x, Queue<Key> q)
public Iterable<Key> levelOrder()
echo "H E L L O W O R L D" | java BST
PRE-ORDER
H 0
E 1
D 9
L 8
O 6
W 5
R 7
POST-ORDER
D 9
E 1
R 7
W 5
O 6
L 8
H 0
IN-ORDER
D 9
E 1
H 0
L 8
O 6
R 7
W 5
LEVEL-ORDER