Wrong Answer in this


plzzz… check the code.

@Pramod123
You have declare your map outside while loop of testcases. So you need to clear your map for each testcase so that it doesn’t contain data from previous testcase. You can either write m.clear() after line no. 9 or you can declare you map inside while loop. You code will work fine.

@Pramod123
please mark this doubt as resolved. You got 100 points.

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.