Questions tagged [binary-search]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers

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
0 answers

pset3 find: Bus error (core dumped)

I finished the binary search algorithm and I get an error Bus error (core dumped) when I try to test it using the generate tool which is given. However, it works fine when I input the haystacks myself....
pythonhax's user avatar
  • 146
0 votes
1 answer

pset 3 "search": expected an exit code of 0, not 1

I'm at the very end of the "find, sort, search" section of pset3, but when using check50, I get "expected an exit code of 0, not 1". This only happens on the checks where check50 is looking for a ...
Chris's user avatar
  • 41
0 votes
1 answer

Is it okay to check my code against a reference book?

Alright, so I've been having trouble making binary search (I think I either made an asymptote, or it degrades too quickly.), so I decided to see if my reference book had anything on Binary Search. It ...
Phoxxent's user avatar
0 votes
0 answers

PSET3 \ expected an exit code of 0, not 1 (find.c)

I successfully built my program and went on to check it using check50 only to discover this :) helpers.c exists :) helpers.c compiles :) finds 42 in {42,43,44} :) finds 42 in {41,42,43} :) finds 42 ...
Ubuntu NutCracker's user avatar