R9 found atlast


how to repeat this code for entire array?
output is coming wrong

@Aditiverma You are needed to find the last occurrence of a given number so simple start the recursive search from the last index instead of starting from the 0th index.
Refer to this code:

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.