Inorder tree traversal without using recursion.
Simplest method are using a stack. and perform inorder tree traversal.
Suppose following node are contain in binary tree.
Inorder : 4 2 1 8 10 3 9 30
Inorder traversal using stack.
View pointers and code execution process.
view stack pointers.
Try it Yourself
C program for inorder traversal of binary tree. time complexity O(n).