Micro Focus Interview Question

Solve a binary tree exercise.