Search
⌘K

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

Amazon


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid December, 2024

Amazon

Amazon

Mid-level

Parse a file containing manager-employee relationships and look for a specific manager

Comments

Your account is free and you can post anonymously if you choose.