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
57 stars 177 forks source link

Meta Binary Search #1169

Open PradeepFSTdhane123 opened 4 hours ago

PradeepFSTdhane123 commented 4 hours ago

Issue Summary

Meta Binary Search, also known as "Bitwise Binary Search" or "Optimized Binary Search," is an optimized version of the traditional binary search that involves using bitwise operations to reduce the number of comparisons during search. Instead of computing the middle index using arithmetic operations, this approach directly manipulates bits to find the mid-point or control search flow.

Issue Description

The advantage of Meta Binary Search over binary search is that it can perform fewer comparisons in some cases, particularly when the target element is close to the beginning of the list. The disadvantage is that the algorithm may perform more comparisons than binary search in other cases, particularly when the target element is close to the end of the list. Therefore, Meta Binary Search is most effective when the list is ordered in a way that is consistent with the distribution of the target elements.

Proposed Solution (Optional)

Here I want to add this algorithm in searching algorithm folder. I also follow all the rule which is required for contribution and code

Priority

High - Requires urgent attention

Category

Additional Context (Optional)

No response

github-actions[bot] commented 4 hours ago

👋 Hi @PradeepFSTdhane123! Thanks for opening this issue. We appreciate your contribution to the Algo project. Our team will review it soon.

PradeepFSTdhane123 commented 4 hours ago

@ajay-dhangar "I would love the opportunity to contribute and work on this project. Could you please assign the issue to me? I'm eager to dive in and make a meaningful impact. Thank you for considering my request!"