20 | --------------+-------------- | | 10 40 -----+ | 30
20 | --------------+-------------- | | 10 40 -----+ | 30
20 | --------------+-------------- | | 10 40 -----+ | 30
20 | --------------+-------------- | | 10 40 -----+ | 30
Action | Description |
---|---|
Traverse to Left | Traverse (move) to the node to the left (if null then no action) |
Traverse to Right | Traverse (move) to the node to the right (if null then no action) |
Visit Data | Visit the data at the current node (e.g. print the data) |
20 | --------------+-------------- | | 10 40 -----+ | 30
Traversal Type | Example Usages |
---|---|
Inorder |
|
Preorder |
|
Postorder |
|