Algorithm · Amplitude · Hard
This interview contains three implementation exercises. Solve each part independently and preserve the stated input/output contract. Task A: Workforce Validation by Recursive Reachability The workforce is represented by four parallel arrays of length $$n$$. For any index i, badge[i] is the employee identifier, label[i] is the display name, pay[i] is the compensation amount, and subordinates[i] lists the indices of employees who report directly to i. The array topLevel…
Checking your access…