Whats the mistake

Hello @garganshul151 what is the error that you are facing?

Tcs are failed all of them

PLease answer to this

Hello @garganshul151 your code is not producing correct ouput for any of the test case.

Hello @garganshul151 this is the correct code :


if you have any doubt you can ask here:
Happy Learning!!

but can you tell mistake in m ycode?

hello @garganshul151 your logic was right but you were not implementing it correctly.

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.