
You are given an integer array, nums , and an integer k . nums comprises of only 0 's and 1 's. In one move, you can choose two adjacent indices and swap their values.
Return the minimum number of moves required so that nums has k consecutive 1 's .
1 <= nums.length <= 10 ^5nums[i] is 0 or 1 .1 <= k <= sum(nums)