Implement an InOrder traversal of a tree. In this traversal left subtree is visited first, then root node, and finally right subtree.
Definition of a tree:
Implement function InOrder that prints in one line the vertices of the tree in order of InOrder traversal. Separate the vertices with one space.
During the InOrder traversal vertices will be printed in the next order: 1 2 3 4 9 10 16.