Skip to main content
4 votes
Accepted

Question about binary search. Please help!

Even or odd, it doesn't really matter. The point is that you are dividing the list approximately in half, give or take. If the split doesn't occur exactly at the middle (odd number of elements), it ...
Cliff B's user avatar
  • 69.3k
1 vote
Accepted

cs50 pset3 binary search

You are getting this error message because, apparently the compiler couldn't find the main function in your program. Most probably you are compiling your code like this: make helpers the compiler ...
Abdullah Emad's user avatar
1 vote
Accepted

Binary search implementation help please

Binary search means: You have a search interval, with left and right boundary. Is the interval empty? Yes => :( Value not found No => keep doing Calculate the middle index of the interval You ...
Blauelf's user avatar
  • 21k
1 vote

Recursive binary function returns error: control reaches end of non-void function

Your binarysearch function follows this logic: if (something) { if (something_else) { else { /* ... */ } /* **ERR:NOTHING_IS_RETURNED** */ // Here you must add a ...
Martin Kleiven's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible