Back to All Algorithms
Linear Search
Category: Searching | Time: O(n) | Space: O(1)
Visualization
Visual representation of the data structure
Enter an algorithm and input to start visualization.
About Linear Search

A simple 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. It is one of the simplest searching algorithms.

Code Editor
The code is for reference. Editing it won't affect the visualization.
1
2
3
4
5
6
7
8
Frequently Asked Questions
About Linear Search

Related Interview Questions
Practice with real problems