All Questions
Tagged with binary-search pset3-helper.c
4 questions
0
votes
2
answers
193
views
Pset3 helpers.c
i'm stuck in binary search. Check50 doesn't pass all the checks and it doesn't find the needle, I feel like the algorithm i have implemented is correct but it doesn't work. I've been stuck in this for ...
0
votes
1
answer
95
views
Pset3 Find - Not sure what is wrong with helpers.c code
I am not sure what is wrong with the code. It seems to work on some of the criteria when using cs50's check50, but does not work on others. There also does not seem to have a pattern about the wrong ...
0
votes
1
answer
48
views
Pset3 helpers.c while loop exiting unexpectedly
I am trying to implement a binary search algorithm. However, my while loop isn't working as expected. Having used printf and debug50 with a list of 100 numbers, it seems that the while loop only gets ...
0
votes
1
answer
23
views
Binary search: always false when 2 or 3 numbers entered
My binary search works correctly when you enter 1,4,5,6,7 (etc)... numbers or 'haystacks'. However, when 2 or 3 numbers or 'haystacks' are entered, false is always returned. I have tried everything I ...