It is easy to traverse a binary tree in-order using recursion. Do it without using recursion.
It is possible to mimic the recursive behavior of an algorithm using stack. The algorithm is following (as described in the link):
– Create an empty stack S.
– Initialize current node as root
– Push the current node to S and set current = current->left until current is NULL
– If current is NULL and stack is not empty then
—- Pop the top item from stack.
—- Print the popped item, set current = current->right
—- Go to step 3.
– If current is NULL and stack is empty then we are done.