We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a7bae1 commit b316af0Copy full SHA for b316af0
docs/solutions/1200-1299/minimum-swaps-to-make-strings-equal.md
@@ -52,8 +52,10 @@
52
我们把这两种情况分别进行统计。
53
54
- 当遇到 $s1[i] == s2[i]$ 时直接跳过。
55
-- 当遇到 `s1[i] == 'x'`,`s2[i] == 'y'` 时,则统计数量到变量 $xyCnt$ 中。
56
-- 当遇到 `s1[i] == 'y'`,`s2[i] == 'y'` 时,则统计数量到变量 $yxCnt$ 中。
+- 当遇到 $s1[i] \ne s2[i]$ 时:
+ - 如果 `s1[i] == 'x'`,`s2[i] == 'y'`,则统计数量到变量 $xyCnt$ 中。
57
+ - 如果 `s1[i] == 'y'`,`s2[i] == 'y'`,则统计数量到变量 $yxCnt$ 中。
58
+
59
60
则最后我们只需要判断 $xyCnt$ 和 $yxCnt$ 的个数即可。
61
0 commit comments