Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1270. All People Report to the Given Manager
Given a list of manager→employee relationships and a target manager, return all employees who directly or indirectly report to that manager. Build the org graph and perform a DFS/BFS from the manager to collect all reachable subordinates across multiple levels while avoiding revisiting nodes.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid December, 2024
Amazon
Mid-level
Parse a file containing manager-employee relationships and look for a specific manager
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.