Ping Identity interview question

Tree traversal