Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Add Ubiquitous Binary Search #5851

Open
anijit18 opened this issue Oct 15, 2024 · 5 comments
Open

[FEATURE REQUEST] Add Ubiquitous Binary Search #5851

anijit18 opened this issue Oct 15, 2024 · 5 comments

Comments

@anijit18
Copy link

What would you like to Propose?

The “Ubiquitous Search Algorithm” would typically refer to a straightforward search method where we converge the search space till 'l' and 'r' points single element. If the middle location falls in the first pulse, the condition (A[m] < A[r]) doesn’t satisfy, we converge our search space to A[m+1 … r]. If the middle location falls in the second pulse, the condition (A[m] < A[r]) satisfied, we converge our search space to A[1 … m]. At every iteration we check for search space size, if it is 1, we are done.

-> Worst-case performance Θ(N)
-> Best-case performance O(1)
-> Average-case performance Θ(log(N))

Issue details

We are handling the corner cases in the present in the Binary Search in more effecient way in Ubiquitous Binary Search.

Additional Information

No response

@subham-behera
Copy link

@anijit18 I would like to work on the following issue.

@raghavy11
Copy link

raghavy11 commented Oct 19, 2024

Hello @anijit18 i'm interested in doing it! can you assign this to me.

@gourab9817
Copy link

@anijit18 I would like to solve this issue can you please assign it to me

@SREERAM-KT
Copy link

@anijit18 I would like to work on this task, please help in assigning it to me

@sachininfy51
Copy link

Hi @anijit18 ,

I would like to propose my interest in contributing to the implementation of the "Ubiquitous Search Algorithm" as described in the issue details. I believe this algorithm could improve the handling of corner cases in the current binary search implementation.

I have experience with search algorithms and optimization techniques, and I am eager to explore the convergence of the search space as outlined. I can help ensure that we achieve the desired performance metrics:

  • Worst-case performance: Θ(N)
  • Best-case performance: O(1)
  • Average-case performance: Θ(log(N))

If possible, could you please assign this issue to me? I look forward to collaborating with the team on this enhancement!

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants