ajay-dhangar / algo

This repository contains a collection of data structures and algorithms implemented in various programming languages. It is designed to help learners understand key concepts through hands-on examples. Contributions and improvements are welcome!
https://ajay-dhangar.github.io/algo/
MIT License
70 stars 231 forks source link

[Feature]: Want to add interpolation search algorithm in search folder #1835

Closed Jivan052 closed 1 week ago

Jivan052 commented 1 week ago

Feature Name

Interpolation search algorithm

Feature Description

Interpolation Search is an efficient search algorithm, especially suited for cases where the data is uniformly distributed. It can outperform Binary Search in such situations due to its better positioning strategy, which estimates the position of the search value rather than just using the midpoint (as in Binary Search).

Motivation

Adding Interpolation Search as a feature in Algo (or any algorithm toolkit) would be highly beneficial for users who work with large, sorted datasets that have a uniform or close-to-uniform distribution. This algorithm provides a valuable alternative to Binary Search by offering a faster average case performance of 𝑂(log(log 𝑛)) for certain data distributions, making it ideal for scenarios where search efficiency is paramount, such as in database indexing, large analytics platforms, and certain types of search engines.

Implementation Suggestions (Optional)

Feature Type

New Algorithm

Does this feature require additional resources?

References (Optional)

https://www.geeksforgeeks.org/interpolation-search/

Jivan052 commented 1 week ago

@ajay-dhangar assign this issue to me