Computing · Algorithms / Principles and exploration
Linear and binary search experiment guide
Watch the candidate range and current probe in a sorted list.
How does it work?
Binary search halves the candidate range at each probe.
Key relationship
binary steps ≤ ⌊log₂n⌋ + 1
Try this investigation
- Watch the candidate range and current probe in a sorted list.
- Run and record each of the three reference settings.
- Change one variable and compare with the reference records.
Interpreting your results
What does binary search require?
A sorted list · Binary search halves the candidate range at each probe.
Assumptions and limitations
The sorted integer list has no duplicates. Both methods use the same list.