Trees
Trees: Who Works Under Whom? Trees, Print the Chart, Count the Teams: Walking a Tree in the Right Order.
Updated
- Who Works Under Whom? Trees (Apprentice): List everyone who works under a manager in a company of 10,000, without rereading every row for every person: why a list of rows and a name-to-manager dictionary fall short, and the structure that fixes them, the tree, with its words (root, parent, child, leaf, depth and height).
- Print the Chart, Count the Teams: Walking a Tree in the Right Order (Journeyman): Show one org chart three ways (printed with each team indented, with each manager's head count, and one level at a time) by visiting every person in the order each job needs: the four traversals, and which job each one is for.