Minimum swaps required to make a binary string divisible by 2^k
Given a binary string S of length N and an integer K, the task is to find the minimum number of adjacent swaps required to make the binary string divisible by 2K. If it is not possible then print -1. Examples: Input: S = "100111", K = 2 Output: 6 Swapping the right-most zero 3 times to the right, we