Linear search
Search algorithm in unsorted lists
In computer science, linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole list has been searched.
Nº Q787903 ★
Common · History
Linear search
Search algorithm in unsorted lists
In computer science, linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole list has been searched.
From Wikipedia
In computer science, linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole list has been searched. A linear search runs in linear time in the worst case, and makes at most n comparisons, where n is the length of the list. If each element is equally likely to be searched, then linear search has an average case of n+1/2 comparisons, but the average case can be affected if the search probabilities for each element vary. 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.
Text: Wikipédia, CC BY-SA 4.0. · Image: Pluke (CC0) ·
Related cards
-
Linear probing
Collision resolution scheme
Nº Q2988094 ★
Not listed
-
Golden-section search
Technique for finding the maximum of a unimodal function by probing a sequence of points whose distances decrease in the golden ratio at each step
Nº Q2424337 ★★
Not listed
-
BLAST (biotechnology)
Bioinformatics software
Nº Q286820 ★
Not listed
-
Depth-first search
Algorithm for traversing or searching tree or graph data structures
Nº Q816319 ★★
Not listed
-
L
List (abstract data type)
Abstract data type used in computer science
Nº Q27948 ★
Not listed
-
Vertical line test
Mathematical concept
Nº Q7212729 ★
Not listed