Company: Kickdrum_17sep
Difficulty: medium
Minimum Time to Alert All Employees Problem Description A company has n employees labeled 1..n , organized in a tree-like hierarchy. Each employee may have direct reports, and exactly one person is at the top (the CEO, the root). You are given the company hierarchy as a binary tree: Each Node represents an employee. Node->data is the employee ID. Node->left and Node->right represent their direct reports (if any). An urgent alert starts at a target employee. Every minute, any employee who knows the alert passes it to: Their manager Their direct reports Return the minimum number of minutes required for the alert to reach all employees. Input Format The tree is given as standard input (level-order representation of the company hierarchy). target : the employee ID where the alert begins. Output Format Single integer: minutes needed for the alert to reach everyone. Constraints 1 Employees are labeled 1..n The hierarchy is a valid tree Examples Example 1: Input: target = 5 root = [1, 2, 3, 4