← Questions

Top k with a deterministically noisy comparator

0
MercorCodingLast asked Sep 2026

A coding interview question asked in Mercor's coding round, last asked Sep 2026. It tests sorting, heaps and robustness.

You have n numbers and must return the k largest, but you may compare them only through cmp(a, b), and it is wrong about 10% of the time. The mistakes are sticky: if cmp(x, y) is wrong once, asking again returns the same wrong answer, so…

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

  • Mercor · Coding · Last asked Sep 202645 min · Live coding

What it tests

sorting · heaps · robustness

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