You are given a 0-indexed string blocks of length n, where blocks[i] is either 'W' (a white block) or 'B' (a black block). You are also given an integer k, the number of consecutive black blocks you want.
In one operation you may recolor a white block so that it becomes black.
Return the minimum number of operations needed so that there is at least one occurrence of k consecutive black blocks.