LinkedIn interview question

Coding problem to using tree traversal and recursion