Test case error

The code is working properly for the input test case but not for any of the hidden test cases.

Change line no 26 to
if(m.count(chk)==0)
and replace line no 29 by No, instead of Yes

Please explain why.I did not understand the logic and its not working that way . Please check if I have made the correct changes. https://ide.codingblocks.com/s/89977

Yes your changes are fine, try to submit your code

https://ide.codingblocks.com/s/107232 Sir, what is wrong in this? the test cases are not working.

hey @samriddhi.srivastava2017, can you share the problem statement here.

Hi @samriddhi.srivastava2017

Read the question carefully and try to understand that you will need a new map for every test case and you are making only one map for all the test cases. Apart from this update your code’s line:20 as while(q>0) .

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.