Searching Algorithms

  • Last Updated : 26 Sep, 2023

DSA for Beginners
Learn more about Searching Algorithms in DSA Self Paced Course
Practice Problems on Searching Algorithms
Top Quizzes on Searching Algorithms

What is Searching Algorithm?

Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is stored.

Searching Algorithms

Based on the type of search operation, these algorithms are generally classified into two categories:

  1. Sequential Search: In this, the list or array is traversed sequentially and every element is checked. For example: Linear Search.

    Linear Search to find the element “20” in a given list of numbers



  2. Interval Search: These algorithms are specifically designed for searching in sorted data-structures. These type of searching algorithms are much more efficient than Linear Search as they repeatedly target the center of the search structure and divide the search space in half. For Example: Binary Search.

    Binary Search to find the element “23” in a given list of numbers

    Binary Search

    Binary Search

Topic :

Searching Algorithm:

  1. Linear Search
  2. Sentinel Linear Search
  3. Binary Search
  4. Meta Binary Search | One-Sided Binary Search
  5. Ternary Search
  6. Jump Search
  7. Interpolation Search
  8. Exponential Search
  9. Fibonacci Search
  10. The Ubiquitous Binary Search


  1. Linear Search vs Binary Search
  2. Interpolation search vs Binary search
  3. Why is Binary Search preferred over Ternary Search?
  4. Is Sentinel Linear Search better than normal Linear Search?

Library Implementations of Searching Algorithms :

  1. Binary Search functions in C++ STL (binary_search, lower_bound and upper_bound)
  2. Arrays.binarySearch() in Java with examples | Set 1
  3. Arrays.binarySearch() in Java with examples | Set 2 (Search in subarray)
  4. Collections.binarySearch() in Java with Examples

Some standard problems on Searching:

Quick Links:

  1. ‘Practice Problems’ on Searching
  2. ‘Quizzes’ on Searching


If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or if you want to share more information about the topic discussed above.