Traversal

Once the binary search tree has been created, its elements can be retrieved in order by recursively traversing the left subtree of the root node, accessing the node itself, then recursively traversing the right subtree of the node, continuing this pattern with each node in the tree as it's recursively accessed. The tree may also be traversed in pre-order or post-order traversals.

Here is an algorithm for Traversal a binary search tree
---------------------------------------------------
/* def traverse_binary_tree(treenode):
if treenode is None: return
left, nodevalue, right = treenode
traverse_binary_tree(left)
visit(nodevalue)
traverse_binary_tree(right)
----------------------------------------------------

Traversal requires O(n) time, since it must visit every node. This algorithm is also O(n), and so it is asymptotically optimal.