Challenge: Print In-order Traversal

Let’s print the in-order traversal of a tree.

Problem

Given a binary tree, perform an in-order traversal by completing the PrintInOrder() function. An in-order traversal is a traversal in which a node is visited in between its left child and right children.

Input

A binary tree.

Output

Display in-order traversal of the tree on the console.

Sample input

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.