i am getting wa
sliding +map approach
i am getting wa
u can use that as well but u have to add if condition in it anyway so thatswhy removed the loop
Okay I will
…
m[start]--;//added this
if(m[start]==0)//added constraint
count=count-1;
start++; //changed order here
Do this order,earlier i was checking for condition after incrementing start which was a mistake
If this resolves your query then please mark it as resolved
Sometimes testcases are weak thats why
It does not depend on the compiler ,it depends on the testcase