Can anyone tell me the approach of this question

You are given two integers N and K.
A string consists of 0 and 1s you can perform the following operations on it in a string S.
Choose a substring K and change ‘0’ to ‘1’ and vice versa in it.

Determine whether it is possilbe to convert every character of the string S to ‘0’.


1 Like

This question already has answers here

1 Like

I think the problem is from some ongoing contest. :joy: :joy:


Lol, I just answered the same problem in a different thread. Is it from some ongoing contest?

@sudo_s @ashish_kaur i have posted my question around 8pm and contest ended at 6:30 pm you can aso check the screenshot below.Capture

Have you got the solution to this question?

pls share the ans?