LinkedIn Interview Question

Implement a tree traversal with some data extraction