← Questions

Top k values per key in a MapReduce job

0
DatabricksCodingLast asked Oct 2026

A coding interview question asked in Databricks's technical phone screen, last asked Oct 2026. It tests mapreduce, heaps and hash maps.

Write the reduce side of a MapReduce job that finds the k largest values for every key. The mapper passes each (key, value) pair through unchanged, and the shuffle groups the pairs by key.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

mapreduce · heaps · hash maps

Your code and the AI tutor open when you unlock this question.