The Design Exam Scores Tracker interview question asks you to build a system that manages student IDs and their exam scores. You need to support updating a student's score and calculating the rank of a specific score among all scores recorded so far. This Design Exam Scores Tracker coding problem is about maintaining a dynamically updated sorted collection of values.
Meesho uses this to test your ability to use Binary Search interview patterns and efficient sorting. It evaluates how you handle frequent updates to values that affect global rankings. It's a test of whether you can optimize a search from to using sorted structures or specialized data representations.
This problem follows the Hash Map + Frequency Tracking pattern.
Map<StudentID, Score>: To keep track of each student's current score.update(std1, 80), update(std2, 90), update(std3, 85).[80, 85, 90].getRank(85): There is 1 score higher than 85. Rank is 2.update(std1, 95): Scores list becomes [85, 90, 95].getRank(85): Now there are 2 scores higher than 85. Rank is 3.If the range of values (scores) is small, Binary Indexed Trees are incredibly efficient. If the range is large, look into Ordered Sets that support "Order Statistic" operations (finding the index of an element in sorted order).
| Title | Difficulty | Topics | LeetCode |
|---|---|---|---|
| Special Array II | Medium | Solve | |
| Zero Array Transformation II | Medium | Solve | |
| Maximum Average Subarray II | Hard | Solve | |
| Range Sum Query - Immutable | Easy | Solve | |
| My Calendar II | Medium | Solve |