Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
109 views

Pset 3 Recursive Binary Search problems - Always returns true

I have tried almost everything and edited my code a hundred times in search of an answer. It seems that whenever I run the program (find.c) the result always resolves to true. Not sure where the ...
Mo Amer's user avatar
0 votes
1 answer
325 views

Need help with recursive binary search

Here is my helpers.c file, I have been scouring the message boards and nothing is making sense. I use the pset3 input of ./generate 1000 50 | ./find 127. I get a Didn't find needle in haystack ...
Ian Sullivan's user avatar
1 vote
1 answer
172 views

pset3 - recursive binary search not compiling

I wrote a recursive function for binary search in pset" and I keep getting the same error from clang: "control may reach end on non-void function" it is driving me crazy... some help would be very ...
DavNej's user avatar
  • 13
1 vote
2 answers
4k views

Pset3 Binary Search problems

I have tested the code presented in the picture and find this function always returns false no matter what number you search.There must be a problem in it but I can not see it!! Can anyone help me ? ...
Yan Zhang's user avatar
0 votes
1 answer
645 views

Slice a list for recursive function in pset3 search

I'm using a recursive function for pset3's binary search. How do you call the same function again giving half the list as an argument?
pythonhax's user avatar
  • 146