plzzz… check the code.
Wrong Answer in this
@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.
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.