Inspect entries one by one until a match is found or all entries have been checked. Linear search needs no ordering assumption; an absent target requires equality comparisons in a collection of entries.
Articles by others on the same topic
Linear search, also known as sequential search, is a basic search algorithm used to find a specific value (known as the target) within a list or an array. The algorithm operates by checking each element of the list sequentially until the target value is found or the entire list has been searched. ### How Linear Search Works: 1. **Start at the beginning** of the list. 2. **Compare** the current element with the target value.