Somthings are very wrong


Wasted a lot of my time.
There is some problem with test cases because same test case is giviing wrong when submitted but giving right when test by custom input.
Please recheck how internal code is working


Yes, the tester needs corrections, totally agree!


This is because , may be u are declaring answer vector globally
try passing it with function


I am passing result vector to function and there is no global variable. By the way I submitted same code again and it accepted it this time. I guess things are fixed now :slightly_smiling_face: