Getting TLE for O(nk )type solution
I am not able to understand the discussed soltuion there also
Leetcode minimum k bit flip TLE
You have to do it in O(n) time and not O(n*k) time.
Try to use queue and combine it with window sliding.
Incase,you are unable to come up with a solution then i will send you my code.