Help needed with the base case

can you please help me with the base case of this problem please

Hello @av8055 the base case for this should be like this:
if(N==1 or N==2){

    return N+1;

}

I took the base case as if(n==0 or n==1) return n+1 is this fine

@av8055 yes it should work.

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.

@Tushara272 why are we returning 1 when the string length is 0?