作者:
Rushia (みけねこ的鼻屎)
2022-11-08 09:27:491544. Make The String Great
龍大是個字串處理員他會收到很多字串,如果這個字串壞掉了他就要把字串壞掉的部分切
掉,一個字串是「好」的他必須滿足:
* 任意兩個相鄰字串不可以是一個大寫一個小寫的英文字母
例如:leE(eE是壞的所以要切掉讓他變l)
字串只包含大小寫英文字母。
Example1:
Input: s = "leEeetcode"
Output: "leetcode"
Explanation: In the first step, either you choose i = 1 or i = 2, both will
result "leEeetcode" to be reduced to "leetcode".
Example2:
Input: s = "abBAcC"
Output: ""
Explanation: 刪除的順序可能有多種:
"abBAcC"