All test case not clearing

sir can u pls help me out with this question… actually output is coming correct but all test cases are not passing…

Hello @Vaibhav277,

Your logic is incomplete and does not account many cases.
Corrected Code:

Hope, this would help.
Give a like if you are satisfied.

okay…thank you sir…