My Docs
BlogGithubLinkedin
Data Structures & Algorithms
Data Structures & Algorithms
  • Data Structures & Algorithms
  • trees
    • 🌳Trees
    • Page 1
      • Breadth-First Search (BFS)
  • 🕸️Graph
    • Graphs
    • ⛓️Linked List
    • Binary Search
    • Linear Search
Powered by GitBook
On this page
  • Linear Search
  • Complexity
  • References

Was this helpful?

Edit on GitHub
  1. Graph

Linear Search

PreviousBinary Search

Last updated 3 years ago

Was this helpful?

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

🕸️
Wikipedia
TutorialsPoint
Youtube