Maximum Reporting Layer (Tree Height)
Asked at Rippling · Coding Questions · Difficulty: Easy
You are given a company reporting structure that forms a rooted tree with employees labeled `1..n`, where `1` is the CEO (the root). You are given `manager[i]` and `reportee[i]` pairs (there are `n-1` pairs), meaning `reportee[i]` directly reports to `manager[i]`. The pairs form a valid tree rooted at `1`.
Loading the problem…
More Rippling interview questions
- Design a Hotel Booking System with External Inventory
- Design a User Behavior / Metrics Monitoring Aggregator
- Runnable Stack Overflow / Quora REST Service
- Poker Hand Comparison With Custom Ranking
- Project Deep Dive and Hiring-Manager Behavioral Round
- Median of Two Sorted Arrays