What is a linear search?

What is a linear search ?

Linear Search is a searching algorithm which runs in O(N) time complexity and searches a element from an array by visiting all of its elements.

In computer science, a 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.

worst complexity: O(n)

Average complexity: O(n)

Space Complexity: O(1)

Worst Case Space Complexity: O(1) iterative

Average perfomance: O(n/2)

Class: Search algorithm