I am getting a wrong answer for this problem although it passes all the given test cases. Can anyone please help me with this and help me find the error?
If you want people to find the error in your code then you have to show them your code.