Re: [闲聊] 每日LeetCode

楼主: Rushia (みけねこ的鼻屎)   2022-11-08 09:27:49
1544. 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"
作者: p54661205 (APK)   2022-11-08 09:30:00
大师
作者: pandix (面包屌)   2022-11-08 09:38:00
大师java不能直接把stack转阵列喔 好麻烦
楼主: Rushia (みけねこ的鼻屎)   2022-11-08 09:40:00
:(可以转泛型阵列Character[] 但是没啥用因为String没有对应的建构式 只能接受char[]
作者: PyTorch (屁眼火炬)   2022-11-08 09:50:00
大师

Links booklink

Contact Us: admin [ a t ] ucptt.com