Pick the fix
Which question suits binary search on the answer?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A The least daily capacity to finish all orders within 10 days
Right: more capacity never needs more days, and checking one capacity is a quick greedy pass.
A monotonic yes or no check over a range of values is what binary search on the answer needs.
Why not the others?
- B The number of distinct values in a list. That is a set size, not a search.
- C Whether a list contains a duplicate. A hash set answers that directly.