1247. 交换字符使得字符串相同 #244
Replies: 1 comment 1 reply
-
|
我们把这两种情况分别进行统计。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
1247. 交换字符使得字符串相同
--- 1247. 交换字符使得字符串相同 标签:贪心、数学、字符串 难度:中等 题目链接 1247. 交换字符使得字符串相同 - 力扣 题目大意 描述:给定两个长度相同的字符串 s1 和 s2,并且两个字符串中只含有字符 'x' 和 'y'。现在需要通过「交换字符」的方式使两个字符串相同。 每次「交换字符」,需要分别从两个字符串中各选一个字符进行交换...
https://algo.itcharge.cn/solutions/1200-1299/minimum-swaps-to-make-strings-equal/
Beta Was this translation helpful? Give feedback.
All reactions