Why some test cases are not passing?

please check

hey, i think you have given the code for some other problem rather than the problem mentioned, kindly give the code for the mentioned problem or if you want help with your current code close this doubt and open a new one with the correct tag. Thank you.

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.