def recursive_linear_search(array:list,target:int,index:int =0)-> int:
    """
    This a python implementation of recursive linear search algorithm. Where we are applying linear search algorithm with recursion.

    Parameters : 1>array : First parameter to the function is the array(searching space) (accepts both sorted and unsorted array).
                 
                 2>target : Second parameter to the function is target which is the element to be search in the array(argument 1).
                
                 3>index : Third parameter is default parameater to the function. Default value of it is 0 it is a starting position of our seraching.
    
    Output: This function will return the index (starting form zero) of the target(2nd argument) if found in the giving array (1st argument) else will return -1

    Exceptions : TypeError : This exception will be raised when the 1st argument(array) will be any other type rather than list,tuple or string.
                 
                 ValueError: This exception will be raised when the 1st argument of type string and 2nd argument(target) will be of type non-string.As you cannot search non-str element in str.
    Examples :
    >>> recursive_linear_search([1,2,3,4,5],5)
    4
    >>> recursive_linear_search([5,4,3,2,1],3)
    2       
    """
    if type(array) not in (list,tuple,str) : raise TypeError("Invalid input(argument 1) only list,tuple,str allowed")

    if type(array)==str and type(target)!=str : raise ValueError("Invalid input(argument 2) cannot search non-str in str")
    
    if index==len(array): return -1

    if array[index]==target: return index

    return recursive_linear_search(array,target,index+1)