Nutanix Interview Question

Solve a basic tree traversal problem