Searching Algorithms

A searching algorithm is a basic and fundamental step in computing. The searching algorithms are used to search or find one or more than one elements from a dataset. These types of algorithms are used to find elements from specific data structures.

What is Searching?


In computer science, searching is the process of finding an item with specified properties from a collection of items. The items may be stored as records in a database, simple data elements in arrays, text in files, nodes in trees, vertices and edges in graphs, or they may be elements of other search spaces.


Why do we need Searching?


Searching is one of the core computer science algorithms. We know that today’s computers store a lot of information. To retrieve this information proficiently we need very efficient searching algorithms. There are specific ways of organizing the data that improve the searching process. That means it is easy to search for the required element if we keep the data in proper order. Sorting is one of the techniques for making the elements ordered. In this chapter, we will see different 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.

Example: Linear Search.

Linear Search to find the element β€œ1” in a given list of numbers
  • 2. Interval Search: These algorithms are particularly developed for searching in sorted data structures. These types of searching algorithms are much more efficient than Linear Search as they repeatedly target the center of the search structure and separate the search space in half.

Example: Binary Search.

Binary Search to find the element β€œ50” in a given list of numbers

In this Section, We are going to cover the βˆ’

  • Binary Search
  • Linear Search
  • Exponential Search
  • Interpolation Search
  • Jump Search
  • Ternary Search

This article is contributed by : Sayan Dutta to this article on csforall.in

1 Comment

  1. gate.io
    February 7, 2023

    Your article helped me a lot, thanks for the information. I also like your blog theme, can you tell me how you did it?

Leave a Comment