Search
⌘K

Leetcode 1376. Time Needed to Inform All Employees

Given a tree-structured company hierarchy rooted at headID where each employee i takes informTime[i] minutes to notify its direct subordinates, compute the minimum time to inform all employees — equivalently the maximum accumulated informTime along any root-to-leaf path. n can be up to 1e5, so solve with a linear-time tree traversal (DFS/BFS) to accumulate max times.


Question Timeline

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

Comments

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