Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Identify the group with the maximum sum of its top k similarity scores.
Return the smallest index in case of a tie.
Gracefully handle groups with fewer than k movies.
What This Tests
Min-heap utilization for efficient top-k element tracking
Linear traversal with constant-space aggregation per subset
Tie-breaking logic and edge case management
Index mapping and data retrieval optimization
Common Patterns
Heap / Priority Queue
Greedy
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