Meta interview question

Tree traversal with added roles and complexities