Skip to main content
AP CSP course

Topic 3.11 · Interactive concept example

Choose linear search or binary search

  • Unsorted versus sorted data
  • First match versus some match
  • Measured comparisons versus worst case

Change it · step through · explain

Change an input, predict what will happen, then advance one step. Read why the state changes, reset and experiment. This fixed teaching model does not save progress or award XP.

Ready · Make a prediction

Ready to explore: Choose linear search or binary search
  1. Values (0–100; max 8)7,2,7,1Waiting
  2. Target (0–100)7Waiting
  3. AlgorithmlinearWaiting

Ready to explore: Choose linear search or binary search

Why: Change an input, predict the first effect, then advance one step.

Try this: Change one input or choose another listed case. Predict the effect, reset and compare the states and governing rule.