Smart keypad-runtime error

Hi Monika
You just need to take one input.
Your code is asking for multiple input. Read the Input format carefully.

1 Like


check this one ,still some error, @Riyabansal98

Hi Monika

Your code doesn’t work for the case when the input 5608.
It’s going into infinite recursion. Doesn’t work for sample I/O.
Before submitting your code, see it to it that it works correctly for sample I/O.

this is what i m not getting,why it is going into infinite recursion
@Riyabansal98

Hi Monika

Firstly, it’s not compulsory that the string entered by the user will be of length 2. It can be of any length, so take input accordingly. Input string can be 33235, 545 etc.
Also, there is no need to pass each number in the string as separate argument in the helper function. You can use arrays.

Hi Monika
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.

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.

1 Like