why is my code not passing 2 test cases out of 10 test cases.Please tell me the problem in my code.
2 test cases not passing
Reply as soon as possible
very minor mistake of ordering
u have to update only at the end of the while loop
still the testcases are not passing .Please check it before suggesting any changes and next time please tell me my error.Reply as soon as possible
this is the same logic, it passes, only diff that i am chcking for lengths as well
https://ide.codingblocks.com/s/241897 Please don’t suggest other codes and help me identify my error.And don’t take another 20 hrs to reply.
the code that i have given just has different variable names, it is the same logic
only difference is of check for lengths and the final condition for returning the “no string” option
please have a look once, i am requesting you
Got accepted after i changed condition from count==0 to startidx==-1 but i could not understand the errror in my code.Help me understand that.
that is because, there is a chance that count will be incremented but it will not be equal to length
and hence startidx will not be updated
but count will not be zero and hence no window was found