Skip to content

Files

Latest commit

 

History

History

Search

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Searching Algorithms

Searching algorithms are designed to check whether a specific element exists within a data structure or to retrieve its position if it exists.

Searching Algorithms

Linear Search

Linear Search is a simple algorithm that checks every element in the list sequentially until it finds the target or reaches the end.

Time and Space Complexity

Algorithm Time Complexity Space Complexity
Linear Search O(n) O(1)

Binary Search

Binary Search is a more efficient algorithm than Linear Search. It works on sorted arrays and repeatedly divides the search interval in half.

Time and Space Complexity

Algorithm Time Complexity Space Complexity
Binary Search O(log n) O(1)