All Questions
7 questions
0
votes
2
answers
163
views
Binary Search for helpers.c
so as the title suggests I am having some trouble with my implementation of binary search. So based on the logic shown in the lecture, I think my implementation is fine, indeed it works for the cases ...
0
votes
1
answer
76
views
pset3: search (am I in the right track??)
bool search(int value, int values[], int n)
//search for middle lists
if (value == values [n / 2])
{
return 1;
}
//number greater search left
else if ( value > values[n / 2 ])
{
search(int ...
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 ...
0
votes
1
answer
105
views
Check50 is claiming that it's recieving an exit code of 0 rather than 1 (different scenario)
I know this question has been answered before (pset 3 "search": expected an exit code of 0, not 1), but I took a look at it, and it seems that the scenario in which the person asked the ...
0
votes
1
answer
167
views
Pset3 - Function returns both true and false in while loop
In my code, after successfully searching the element, the function is returning true and false both to the main function. I have questions as follows ->
1 - Why the sm() function is returning true ...
0
votes
1
answer
525
views
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 ...
0
votes
1
answer
585
views
Pset3 Search/Find problems
I have no idea what the problems are with this code, so any help would be appreciated. The code compiles, but the output is skewed. It only sorts after a certain amount of characters, and then sorts ...