Searching in Data Structure a Comprehensive Note

Searching is an operation of finding the specific data or related data present in a file, an array, in a linked list, or any data structure.

What is searching for?

Searching is a process of finding any given data in a large collection of data.

In memory, data is organized in an array, linked list, graph, and tree, etc.

If required data is available in a file or any data structure, we will get a related output otherwise to get no item found or any customizable message.

We can perform a searching operation in both primary and secondary memory.

The complexity of the searching algorithm depends on the number of comparisons required to find specific data from the data collection.

There are two types of searching technique:

a). Sequential Search
b). Binary Search

a). Sequential Search
A sequential search is applied when data is arranged in an unsorted form.

A sequential search is also known as a Linear search because it compares each element from the begining.

A sequential search is a very basic search.

Leave a Comment