All cases failed

There’s something wrong with my approach. Please help me identify my mistake.

My solution: https://ide.codingblocks.com/s/476113

Question: https://online.codingblocks.com/app/player/178555/content/173732/4925/code-challenge

Getting correct answer when compiling with e.g. given.
But, failing all test cases.

hello @mohaktrivedi

check now->

@aman212yadav Oh shit! I had passed j!!?? A small typo ruined the entire code!
Thanks for pointing it out!

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.