algorithms/searching/linear_search_recursion.c
int linearSearch(int arr[], int l, int r, int x)
{
     if (r < l)
        return -1;
     if (arr[l] == x)
        return l;
     if (arr[r] == x)
        return r;
     return linearSearch(arr, l+1, r-1, x);
}
/* Recursive function to search an element in arr[l..r] */
Recursive function to search an element in arr[l..r]
Recursive function to search an element in arr [ l .. r ]
int linearSearch(int arr[], int l, int r, int x)
{
     if (r < l)
        return -1;
     if (arr[l] == x)
        return l;
     if (arr[r] == x)
        return r;
     return linearSearch(arr, l+1, r-1, x);
}
int linearSearch ( int arr [ ] , int l , int r , int x ) { if ( r < l ) return -1 ; if ( arr [ l ] == x ) return l ; if ( arr [ r ] == x ) return r ; return linearSearch ( arr , l + 1 , r - 1 , x ) ; }
Recursive function to search an element in arr[l..r]
Recursive function to search an element in arr [ l .. r ]