Skip to content

Latest commit

 

History

History

LinearSearch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Linear Search

Algorithm type: Search algorithm
Condition: No condition
Time complexity: O(n)

Pseudocode

function search(inputValues: List, item: Integer)
   i ← 0
   while inputValues[i] != item
      i ← i + 1
   return inputValues[i], i
end function

Animation

Go to animation

© Marc Auberer 2020