Design the data structures behind three org-chart APIs — look up a manager, move an employee, add an employee — so that the operations run in constant time.
Design the data structures behind three org-chart APIs — look up a manager, move an employee, add an employee — so that the operations run in constant time.
The discussion opens with the full question.