Back to problems

Lowest Common Manager for Multiple Employees

Algorithm · Google · Medium

Lowest Common Manager Medium · Topics · Company Tags · Hints Imagine you have an org chart structured as a binary tree. Each node is an employee, and edges point from a manager to their direct reports. The employees are numbered 0 through K‑1. The person at the very top (the root) has no supervisor — you can treat their manager ID as -1. You are supplied with two pieces of information: For each employee i, the IDs of their left and right direct reports (or -1 if that slot is…

Checking your access…