Skip to content

Instantly share code, notes, and snippets.

@64lines
Created December 25, 2013 17:34
Show Gist options
  • Save 64lines/8125163 to your computer and use it in GitHub Desktop.
Save 64lines/8125163 to your computer and use it in GitHub Desktop.
int simpleSearch(int vector[], int n, int data) {
for(int i=0; i<n; i++){
if(data == vector[i]) {
return i;
}
}
return -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment