Knight Dialer problem


here are my solutions
please tell me why first one is giving tle while second is not

Hello @gulatigarvita08 even your first code is also correct:


i have commented the small mistake.

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.