Validate Employees in a Hierarchy with Recursive Rules

Asked at Amplitude · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026

You are given a set of employees where each employee may have a list of direct reports (children), forming one or more hierarchies.

Loading the problem…