Google Interview Question — LeetCode 1376

Y Tech
2 min readJan 30, 2022

In this post, we are going to discuss leetcode 1376 — Time Needed to Inform All Employees, which is recently asked in Google interviews.

Problem Analysis

A company has n employees with a unique ID for each employee from 0 to n - 1. The head of the company is the one with headID.

Each employee has one direct manager given in the manager array where manager[i] is the direct manager of the i-th employee, manager[headID] = -1. Also, it is guaranteed that the subordination relationships have a tree

--

--