Recursion prolem of last index

why it is checking the next call why not first one like in this problem at si=0 , it is checking 1 to 5 elements data not an element data at index 0?

Hi @tanishka972,
It is checking index si = 0 but before checking the index si=0 it checks the next index si =1 and so on till last index and when the recursion call ends it returns the index and if the index !=-1 and the element is found then it returns si.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.