HelioLearnSkills for every stage

GRADE 10 · COMPUTATIONAL THINKING · ABOUT 50 MINUTES

Compare search strategies

Explain when binary search is applicable.

Understand the idea

Linear search checks items one by one. Binary search repeatedly narrows a sorted search space. It requires the ordering assumption.

WORKED EXAMPLE

Find 14 in sorted [2,4,6,8,10,12,14,16]. Using lower middle: check 8, then 12, then 14.

Watch it step by step

Step 1 of 4
TRACE THE STATE · READ THE EXPLANATION BELOWStep 18 valuesStep 2…Step 3…Step 4…Each state follows the specific rule in this workedexample.

Set

Sorted list has eight values; target is 14.

Choose Play to advance steps automatically.

Read or choose any step
  1. Set

    Sorted list has eight values; target is 14.

  2. Middle

    Check 8; target is larger.

  3. Narrow

    Check 12 in the remaining upper range.

  4. Find

    Check 14; the target is found.

TRY BEFORE CHECKING

Exercises with feedback

Enable JavaScript for feedback, or use the printed exercises.

MAKE SOMETHING YOU CAN EXPLAIN

Your practical challenge

Trace linear and binary search for 14. Count comparisons and state the midpoint rule.

Review your evidence

These ticks are your self-review. They do not automatically assess project quality. Ask an adult or partner to review what you can show.

Use the skill in a new situation

Test a missing target and a one-item list.

Choose a different space for another learner on this browser.

Notes and checks use this browser, separate from school sign-in.

Each space keeps each grade separate. These spaces are not private accounts; use separate browser profiles for privacy on a shared device. About your practice data

Next: Evaluate errors across groups →All six experiences