Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Design a system to store pins with unique IDs, scores, and categories.
Prevent duplicate entries while efficiently grouping pins by their category.
Retrieve the top K highest-scoring IDs for a specified category without altering the underlying data structure.
What This Tests
Hash table usage for grouping and duplicate detection
Heap / Priority Queue operations for dynamic ranking
State preservation during temporary data extraction
Time and space complexity tradeoffs in data structure design
Common Patterns
Heap / Priority Queue
Hashing
Sorting
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
python
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected