Algorithm 3 Binary Tree Traversal Recursive

Require: a binary tree TT

Ensure: print all keys appearing in TT

1:procedure PrintTree(xx)

2:if x==NILx == NIL then

3:return

4:end if

5:print x.keyx.key

6:PrintTree(x.leftx.left)

7:PrintTree(x.rightx.right)

8:end procedure

9:

10:PrintTree(T.rootT.root)