Watch linear and binary search work step by step. Understand when each algorithm shines β and when it doesn't.
Designed with the WJEC specification in mindChecks each element one by one from the start until the target is found or the end is reached.
Requirement: None β works on any array (sorted or unsorted).
When to use: Small arrays, unsorted data, or when the target is likely near the start.
Repeatedly halves the search space by comparing the target with the middle element.
Requirement: Array must be sorted first.
When to use: Large sorted arrays. Massively faster than linear for big data sets.