This is related to the codechef lunchtime challenge for Feb 2020. The name of problem is not all flavours

I am able to guess the soln and want to solve the problem through sliding window approach but I am not able to write it …plz explain the code and soln for this problem using sliding window approach…
The link to problem is https://www.codechef.com/LTIME81B/problems/NOTALLFL
Plz provide soln and code

Hi,

You can solve this problem using sliding window. Count the possible different type of cake in sliding window. If it becomes equal to k shrink the size of the window otherwise expand the size.

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.