Is there any way to fix this Binary Search Algorithm?
I am trying to make a binary search but it has problems
7 Replies
⌛
This post has been reserved for your question.
Hey @Rag...JN 🌌 🦡 👽 💰! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
You are always just changing the middle index
but you should have a beginning and end and recompute the middleIndex as the index in the middle of that
and each step, you either set the begin or end to the middleIndex (and recompute the middleIndex)
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
yah I did the correct way
low high and mid
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.