Amazon interview question

Recursion on Tree Traversal