next up previous
Next: Up: Previous:

InOrder

   InOrder(x)        ; prints elements in sorted order
      if x <> NIL
      then InOrder(left(x))
           print(key(x))
           InOrder(right(x))

InOrder traversal order: 1 2 4 5 8 10

Traversals


next up previous
Next: Up: Previous: