Sonata Software interview question

tree traversal