This animation compares two ways to find the value 51 in a sorted list of 16 numbers. Linear search checks each element in order, needing up to 13 steps. Binary search repeatedly halves the remaining range, locating the target in just 4 steps. Side-by-side counters and a shrinking search window illustrate why binary search scales as log2 n while linear search scales as n, useful for teaching algorithm efficiency and Big O intuition.
16:9 · every frame verified for overlaps, spacing and edges before rendering
Finding 51 among 16 sorted values: linear search takes 13 steps, binary search takes 4 by halving the range each time; log2 n versus n.