Skip to content

Commit b316af0

Browse files
committed
修正「1247. 交换字符使得字符串相同」题解表述错误
1 parent 8a7bae1 commit b316af0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/solutions/1200-1299/minimum-swaps-to-make-strings-equal.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@
5252
我们把这两种情况分别进行统计。
5353

5454
- 当遇到 $s1[i] == s2[i]$ 时直接跳过。
55-
- 当遇到 `s1[i] == 'x'``s2[i] == 'y'` 时,则统计数量到变量 $xyCnt$ 中。
56-
- 当遇到 `s1[i] == 'y'``s2[i] == 'y'` 时,则统计数量到变量 $yxCnt$ 中。
55+
- 当遇到 $s1[i] \ne s2[i]$ 时:
56+
- 如果 `s1[i] == 'x'`,`s2[i] == 'y'`,则统计数量到变量 $xyCnt$ 中。
57+
- 如果 `s1[i] == 'y'`,`s2[i] == 'y'`,则统计数量到变量 $yxCnt$ 中。
58+
5759

5860
则最后我们只需要判断 $xyCnt$ 和 $yxCnt$ 的个数即可。
5961

0 commit comments

Comments
 (0)