This problem is paper-only - see explanation for the canonical SQL solution.
Given Employee(id, manager_id) where manager_id is null for the CEO, compute each employee's depth below the CEO (CEO depth = 0). The org is a forest in pathological cases; treat each null-manager root as depth 0.
For the auto-grader: return [{ id, depth }] sorted by id ascending. Cycles should not exist; if they do, exclude affected nodes.