It's a technique for traversing all nodes of a tree. In a binary tree, we traverse the left subtree, then the current node, and finally the right subtree.

Are you wondering how inorder traversal applies to n-ary trees? Due to the lack of left or right children, these techniques are most effective in binary trees.

Want to try inorder traversal with recursion? The flow goes left subtree, current node, and right subtree. Don't forget to check if the node is present before traversing.

Algorithm- 1. Traverse left child with a recursive call passing current->left as root. 2. After returning from call, the node would be leftmost so that we can store this as first node of inorder traversal.