25/41
Part 5 of 7 · On the answerLearn and do

When a yes-or-no test flips once as a number grows, binary search the number

So far the search ran over data. Sometimes the sorted thing is the answer itself. Koko Eating Bananas is on Netflix's tag list (1 source), and one Netflix candidate reports an easy binary search question in a phone screen (1 report). Here's that shape in a log pipeline.

A job has five batches of log files, with sizes [30, 11, 23, 4, 20]. A worker processes up to rate files an hour, from one batch at a time. An hour on a batch with fewer than rate files left finishes that batch, and the rest of the hour goes unused. What's the slowest rate that finishes everything within 6 hours?

Predict

Batches of 30, 11, 23, 4 and 20 files, and the job must finish in 6 hours. What's the slowest rate that does it?

Pick an answer above to see the rest