Not able to pass all the test cases


please help me find the mistake in the above code

Please consider this link https://ide.codingblocks.com/s/398445

Hello @prerna_gupta31 please wait i am checking your code:

Hello @prerna_gupta31 i have corrected your code and now it is passing every test case:
i have commented the mistake:


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

Thank you for helping me out

Hello @prerna_gupta31 if this resolves your doubt you can mark this as resolved.
Happy Learning!!