Iterative In-order Traversal of Binary Tree
Write a method for the iterative in-order traversal of a binary tree.
We'll cover the following
Statement
Given a binary tree, write an iterative algorithm for the in-order traversal of a binary tree. The algorithm should print out the value of each node such that it conforms to the in-order traversal of the input binary tree. The function is not expected to return a value, only to print it out on the console.
Example
Let’s look at the tree below:
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.