Linear Search

In computer science, linear search or sequential search is a method for finding a particular value in a list, that consists of checking every one of its elements, one at a time and in sequence, until the desired one is found.

Linear search is the simplest search algorithm; it is a special case of brute-force search. Its worst case cost is proportional to the number of elements in the list; and so is its expected cost, if all list elements are equally likely to be searched for. Therefore, if the list has more than a few elements, other methods (such as binary search or hashing) will be faster, but they also impose additional requirements.

Read more about Linear SearchAnalysis, Application

Other articles related to "search, linear search":

Binary Search Algorithm - Performance - Average Performance
... is the expected number of probes in an average successful search, and the worst case is, just one more probe ... Thus binary search is a logarithmic algorithm and executes in O time ... cases it is considerably faster than a linear search ...
Jump Search
... In computer science, a jump search or block search refers to a search algorithm for ordered lists ... all items Lkm, where and m is the block size, until an item is found that is larger than the search key ... To find the exact position of the search key in the list a linear search is performed on the sublist L ...
Pseudocode - Linear Search On An Ordered List
... If the list is stored as an ordered array, then binary search is almost always more efficient than linear search as with n > 8, say, unless there is some reason to suppose that most searches ...

Famous quotes containing the word search:

    The search for happiness is one of the chief sources of unhappiness.
    Eric Hoffer (1902–1983)