So this is the begining step ive taken towards completeing the searching algorithm in helpers.c. What I wanted to know is if im heading in the right direction based off my code so far.
bool search(int value, int values[], int n)
{ // TODO: implement a searching algorithm
for (int i = 0; i < n; i++)
if (values[i] == values)
{
return true;
}
return false;
}
I know next i need to implement a sorting algorithm of choice, and then to quicken my searching process, go back and redo my searching algorithm to a bubble sort of choice. Either recursive or iterative. Currently my search is suppose to be in a linear format. Am I checking out okay?