Tricky permutation doubt

sir 8th test case does not pass . why?

hi @udaycodingblocks
I am unable to view ur code… u can refer my code -->

sir i have submitted code again . u can check for mistake now

@udaycodingblocks
ur code is correct only… actually there are some compiler issues… my code also which previously passed all test cases is now failing on 2 test cases…
hence don’t worry, u can move ahead with other questions…

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.