Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 1.08 KB

README.md

File metadata and controls

16 lines (9 loc) · 1.08 KB

Searching-Algorithms

The repository contains the two basic searching algorithms, i.e. linear searching algorithm & binary searching algorithm.

Linear Search Algorithm

Linear search is a very simple search algorithm. In this type of search, a sequential search is made over all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection.

Binary Search Algorithm

Binary search is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one.

Recursive Binary Search Algorithm

The idea is to use binary search which is a Divide and Conquer algorithm. Like all divide-and-conquer algorithms, binary search first divides a large array into two smaller subarrays and then recursively (or iteratively) operate the subarrays. So, binary search reduces the search space to half at each step.

more to be added...