0

I just finished the helpers.c pset, where you have to implement a counting sort and then a binary search. I havent made it recursive yet but it works in all of my own test cases. I also ran the ./generate 1000 50 | ./find 127 and the ./generate 1000 50 | ./find 128 and those pass as well. When I do the check50 they all check out fine except the last one which says :( finds 42 in {42, 40, 39, 41}.

It should clearly find the 42 in that list, so is there a problem with the test case? Is there any way we can submit it to cs50?

2
  • It would be great having more information if anybody is meant to help you. For example, have you ensured your sorting works as expected (using debug50 or printing to console when sorting a small array)? If so, are you doing binary search correctly?
    – Blauelf
    May 16, 2017 at 10:07
  • I am actually going through that right now. There is a bug where in the sorting function I cant get the final counting digit to show up in the array. May 16, 2017 at 18:43

0

You must log in to answer this question.

Browse other questions tagged .