1.In-order Traversal
In means root in between.
In-order traversal is to traverse the left subtree first. Then visit the root. Finally, traverse the right subtree.
For binary search tree
, we can retrieve all the data in sorted order using in-order traversal.
Iterative Method using stack
Steps:
1. Print a node
2. Add the address to stack
2. Move to left subtree
3. Move to right subtree
Recursive method
Last updated