How do you know what is the error in your code if you are getting correct answers for given test cases??
you want to know error if you getting correct answers ,
Its simple try more test cases and get answer with each test on your own and then check
it is giving me an error when I submit it, only works for “sample cases”
I am hitting a rock bottom here, brother.