Failing test case =0
instead of just calling fn(arr, n, i+1) you need to return it
Corrected Code
okay but why we have to return it why we cant just call the function
and when we dont return it it gives the errror funtion reaches the non void function why is that ?
if you include the return statement in if else it would not give any error
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.