Atlassian·Software Engineer·Technical Phone Screen
- Design a simple movie rating system that supports adding ratings for items and querying the total score, average score, and number of ratings per item.
- How would your design change if the system needed to handle a very large number of items or high-frequency streaming rating updates?
“I went with a hashmap keyed by item ID, storing count and cumulative score so average is just a division away.”