Sumo Logic Interview Question

Tree traversal