Q1 C
Sameh
c_cpp
2 years ago
170 B
13
Indexable
int linearSearch(int *arr , int size , int key)
{
for(int i = 0 ; i < size ; i++)
{
if(arr[i] == key)
return i;
}
return -1;
}Editor is loading...
Leave a Comment