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

Get hands-on with 1400+ tech skills courses.