00:01
Hello students, here is the c+ + implementation of an in -order traversal of a binary tree using a stack.
00:08
So as here you can see we are using a stack to keep the track of the nodes during the traversal.
00:18
Fine, so we are using a tree node for that.
00:20
Starting from the root node and we keep going to the left most from the root node to the left most.
00:29
We move on to the left most node.
00:32
So we pop the node from the stack and print its value.
00:37
Then we move to the right of the sub -tree.
00:41
So consider as this is your root node.
00:44
This is your root node.
00:47
So fine and these are your child node.
00:52
These are your child node.
00:54
Fine, so it initially goes with the left most of the tree...