) helpers.c exists :( helpers.c compiles \ killed by server :| finds 42 in {42,43,44} \ can't check until a frown turns upside down :| finds 42 in {41,42,43} \ can't check until a frown turns upside down :| finds 42 in {40,41,42} \ can't check until a frown turns upside down :| finds 42 in {41,42,43,44} \ can't check until a frown turns upside down :| finds 42 in {40,41,42,43} \ can't check until a frown turns upside down :| finds 42 in {39,40,41,42} \ can't check until a frown turns upside down :| doesn't find 42 in {39,40,41} \ can't check until a frown turns upside down :| doesn't find 42 in {39,40,41,43} \ can't check until a frown turns upside down
I get this error and when i try on offline ide its all green, however on repeat it works fine. so it sometimes is all green and gets killed by server after checking few minute later
// TODO: implement a searching algorithm int min = 0; int max = n - 1;
if (value > values[n - 1])
{
return false;
}
while (values[min] <= values[max])
{
int mid = (min + max)/2;
if ((value == values[mid]) || (value == values[min]) || (value == values[max]))
return true;
else if (value > values[mid])
{
min = mid + 1;
}
else if (value < values[mid])
{
max = mid - 1;
}
}
return false;