Lowest Common Manager for K Employees
A company's reporting structure is a rooted tree with the CEO as root, and every employee has at most one direct manager. Given root and a non-empty list of k target employees, return their lowest...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
