Microsoft Interview Question

Coding question on binary tree