题目描述: 自己的提交: class Solution: def minimumSwap(self, s1: str, s2: str) -> int: count = {"xy":0,"yx":0} for i in range(len(s1)): if s1[i] == s2[i]: continue elif s1[i] == "x" and s2[i] == "y": count["xy"]…
Special binary strings are binary strings with the following two properties: The number of 0's is equal to the number of 1's. Every prefix of the binary string has at least as many 1's as 0's. Given a special string S, a move consists of choosing two…