Skip to content

Files

Latest commit

a327b68 · Jul 18, 2018

History

History
This branch is 2 commits ahead of, 410 commits behind trekhleb/javascript-algorithms:master.

linear-search

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 25, 2018
Jul 18, 2018
Jul 18, 2018

Linear Search

In computer science, linear search or sequential search is a method for finding a target value within a list. It sequentially 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 runs in at worst linear time and makes at most n comparisons, where n is the length of the list.

Linear Search

Complexity

Time Complexity: O(n) - since in worst case we're checking each element exactly once.

References