Jump to content

Search algorithm

From Simple English Wikipedia, the free encyclopedia
Revision as of 08:01, 11 February 2023 by RDvibhatt (talk | changes) (Link suggestions feature: 2 links added.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A search algorithm is a method for finding a target value within a list. It checks each element of the list for the target value until a match is found or until all the elements have been searched.

Linear search is rarely practical because other search algorithms and schemes, such as the binary search algorithm and hash tables, allow significantly faster searching for all but short lists.