Utility function to find the minimum number of swaps of pair of characters required to make all pairs of adjacent characters different
def minimumSwaps ( S , swaps , idx ) : NEW_LINE INDENT global ansSwaps NEW_LINE DEDENT