Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

readme.md

Linear search

A linear search moves sequentially through a list looking for a target value.

Characteristics

Complexity

🔔 Complexity is considered in terms of worst case.

Time complexity

Notes
Θ(n)

Space complexity

Notes
Θ(1) Space taken by linear search is the same for any number of elements of the list

Optimising

A simple performance optimisation is to locate the values requested more frequently at the start of the list to minimise iterations.