Back to problems

Validate an Employee Hierarchy and Find the Maximum Root-to-Employee Distance

Algorithm · Microsoft · Medium

Maximum Notification Time Medium · Topics · Company Tags · Hints A company has n employees labeled 0 through n-1. Each employee i has a direct manager specified by manager[i]. The CEO (the single top‑level employee) has manager[i] = -1. When an employee i receives a message, they immediately forward it to every direct subordinate; this forwarding step takes exactly informTime[i] minutes. Define the notification time of an employee e as the total time elapsed from the instant…

Checking your access…