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
Pinterest
Coding Question
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
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