CoursesSearch & Priority Patterns

Search on Answers

Lessons
8
Exercises
48
Minutes
49
  1. 1

    Binary Search the Answer

    Recognize 'smallest X that works' problems and binary search the candidate answers, not the input.

    Multiple choiceTap
    5 exercises
    4 min
  2. 2

    Sqrt(x) Without Sqrt

    The simplest answer-space search: find the largest m whose square still fits under x.

    Complete codeDebugMultiple choiceTrace
    6 exercises
    5 min
  3. 3

    Koko Eating Bananas

    Binary search the eating speed: the smallest k whose per-pile hours fit within h.

    Complete codeMultiple choiceTrace
    6 exercises
    6 min
  4. 4

    Capacity to Ship Packages

    Spot the answer-space pattern: binary search over capacities, with a greedy day count as the yes/no check.

    Complete codeMultiple choiceTrace
    6 exercises
    6 min
  5. 5

    Minimum Days for Bouquets

    Build a feasibility check with a twist: bouquets need k ADJACENT bloomed flowers, so the scan counts runs — and guard the impossible case first.

    DebugFill blankMultiple choiceTrace
    5 exercises
    6 min
  6. 6

    Search on Answers CheckpointCheckpoint

    No new concepts — recognize the answer space, choose the bounds, run the feasibility check, and shrink correctly across the island's problems.

    DebugFill blankMultiple choiceTrace
    5 exercises
    6 min
  7. 7

    Search on Answers ReviewReview

    Mixed recap of the island: spotting answer-space problems, the minimize update rules, Koko's hours check, greedy day packing, the sqrt flip, and bouquet adjacency.

    Complete codeDebugMultiple choiceTap
    7 exercises
    6 min
  8. 8

    Boss: Split Array Largest SumBoss

    The hard classic, cracked open: binary search the cap on the largest piece sum between max(nums) and sum(nums), with greedy left-to-right packing as the feasibility check.

    Complete codeCode orderMultiple choiceTapTrace
    8 exercises
    10 min
AlgoFox Pro

Search & Priority Patterns is part of AlgoFox Pro

You can read the whole course outline here. The exercises are in the app, along with your streak, your mistake review, and the progress that carries across your devices.

Pro starts with a 3 day free trial. The app store decides who is eligible for an introductory offer, and a lapsed subscription does not get another one.

Download AlgoFox on the App StoreGet AlgoFox on Google Play

Already subscribed in the app? Sign in with the same account and Pro works here too. Quick Play and Battle are free on the web, and so is the first course in every subject.