New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Affirm
Coding Question
AI Insights
Quick Summary
Construct a company hierarchy from direct parent-child pairs.
Route each incoming loan to its ultimate owning company by following parent links.
Maintain and return dynamic aggregations of loan IDs per top-level entity.
What This Tests
Hash map usage for relationship storage and aggregation
Tree/graph navigation and path resolution
Stateful data structure design
Memoization and path compression techniques
Common Patterns
Hashing
Graph Traversal
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
78
/241
Acceptance Rate
32.4%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected