Q1 C

 avatar
Sameh
c_cpp
a year ago
170 B
4
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