Sumo Logic interview question

Tree traversal