All Questions
1 question
0
votes
1
answer
44
views
pset3 keeps returning 1 even when it should return 0
bool search(int value, int values[], int n)
{
// TODO: implement a searching algorithm
if (value < 0)
return false;
int s = 0;
int e = n - 1;
int m = ((s + e) / 2);
while (s <= e)
{
...