Org Chart from a Reporting List: Count Orgs, Print by Level, Find a Common Manager
Company: Merge
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
Overview: Given a company's employees as (id, title, reports_to) tuples with heads reporting to None, count the separate orgs, print employees level by level, and find the first manager two employees share. It tests building a tree from manager pointers, level-order traversal, ancestor queries and edge cases under a tight time limit.
Read the full Merge Software Engineer interview experience this question came from