Hello! I am solving Pictures with Kittens (easy version).
My approach is pretty much like knapsack. Suppose we are at index i, we have 2 options either to not pick or to pick. If our last pick and current index different == k then we will have to pick it.
But this approach is giving WA on test case 45. Can anyone please tell me what i am missing?
Here is my solution: LINK
Thanks.