Q1 C

 avatar
Sameh
c_cpp
2 months ago
170 B
1
Indexable
Never
int linearSearch(int *arr , int size , int key)
{
    for(int i = 0 ; i < size ; i++)
    {
        if(arr[i] == key)
            return i;
    }
    return -1;
}
Leave a Comment