Linear search using recursion

sir what is the complexity of the code of recursion using linear search

hello @YASHMATHURIA123
it will be O(n) where n is length of ur array.
because in worst case u need to traverse the complete array.

sir so what is the point in using the recursion over loops

it is for practice only. both approaches have O(n) time complexity.