Top K Values per Key with MapReduce

Problem

Given a finite stream of (key, value) records and a positive integer k, use MapReduce to find the largest k values for each distinct key. The target is top k per key, not a global...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: