Algorithms / Searching

Linear search

Check each item in order until a match is found or the list ends.

Start at the beginning

Current comparisonReady to search
Comparisons0

The list

Unsorted · 8 items

    The index counts from 0. Index 0 is the first item.

    Keyboard: ← Back · → Next · R Reset

    Choose another target to start a new search.

    Linear search

    Checking items one at a time, in order, until a match is found or the list ends.

    Target

    The value you are trying to find.

    Index

    An item's numbered position in a list. In this model, indexes start at 0.

    Comparison

    Checking whether an item has the same value as the target.