Data Structure - Search Techniques


Searching in data-strucutre refers to the process of finding a desired element in set of items. The desired element is called "target". The set of items to be searched in, can be any data-structure like − list, array, linked-list, tree or graph.

Search refers to locating a desired element of specified properties in a collection of items. We are going to start our discussion using following commonly used and simple search algorithms.

S.No. Technique & Description
1 Linear Search

Linear search searches all items and its worst execution time is n where n is the number of items.

2 Binary Search

Binary search requires items to be in sorted order but its worst execution time is constant and is much faster than linear search.

3 Interpolation Search

Interpolation search requires items to be in sorted order but its worst execution time is O(n) where n is the number of items and it is much faster than linear search.

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements