Searching algorithms are used to find a specific element in an array, string, linked list or some other data structure.
The most common searching algorithms are:
Linear Search : In this searching algorithm, we check the element iteratively from one end to the other.
Binary Search : In this type of the searching algorithm, we break the data structure into two equal parts and try to decide in which half we need to find for the elements.
Ternary Search : In this case, the array is divided into three parts and based on the values at partitioning positions we decide the segment where we need to find the required element.
Besides these, there are other searching algorithms like
- Jump Search
- Interpolation Search
- Exponential Search
No comments:
Post a Comment