Leaf Domain Cumulative Scores
Company: Amazon
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Onsite
Quick Answer: This question evaluates a candidate's ability to model hierarchical string data and aggregate values along a tree structure, a common pattern in coding interviews involving tries and suffix-based hierarchies. It tests practical algorithm design skills such as identifying leaf nodes, propagating ancestor sums, and handling edge cases like single-label entries efficiently at scale.