I am getting correct answers for a number of testcases but as soon as I submit I get wrong answer error , Kindly have a look at the code
I have added the comments for my approach as well.
I am getting correct answers for a number of testcases but as soon as I submit I get wrong answer error , Kindly have a look at the code
I have added the comments for my approach as well.