Amazon | Onsite | SDE1 | Seattle | Print Employees and Managers According to Class Relationship
Anonymous User
1176

Given a list of employees and their IDs as follows and the manager id is 0 for the CEO.

Such as:

Jeff, 0
John, 1
Lisa, 1
Jacob, 2
Jason, 2
David, 3

Then ask to print the following form according to the class relationship:

Jeff
John
Jacob
Jason
Lisa
David

Comments (2)