Code given in video may be is not correct

in if block for checking digit not to be 0 or 1

if(digit==0 || digit==1){
dialpad(input,output,i+1,j);
}

[as given in video]

but there should be return statement also otherwise for same digit code will run twice

it should be like this

if(digit==0 || digit==1){

dialpad(input,output,i+1,j);

return;

}

hello @soorya19k,

please share the code that u are referring to…

after running original code try running by removing the return ; from the if block if(digit==0 || digit==1){ dialpad(input,output,i+1,j,count); return; }

yeah u r right return statement should be there.
btw why u are handling it separately,it will work even if u remove that if statement

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.