Quant Memo
Coding/●●●●●

Fewest tests to locate a fragile price level

Asked at Jane Street

There are n ordered price levels. At and below some unknown threshold a stress test "survives"; above it the test "breaks" and consumes that probe. You have k identical disposable probes. Each test at a level tells you survive/break. Find the minimum number of tests that guarantees you locate the threshold in the worst case.

k = 2 probes, n = 10 levels
-> 4

Return the minimum worst-case number of tests. With one probe you must scan bottom-up (up to n tests); more probes let you take bigger risks.

Your answer

This one is open-ended. Work it through, then check your reasoning against the full solution.

More Coding questions