mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-03 06:22:54 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个由大小写英文字母组成的字符串 <code>s</code> 。</p>\n\n<p>一个整理好的字符串中,两个相邻字符 <code>s[i]</code> 和 <code>s[i+1]</code>,其中 <code>0<= i <= s.length-2</code> ,要满足如下条件:</p>\n\n<ul>\n\t<li>若 <code>s[i]</code> 是小写字符,则 <code>s[i+1]</code> 不可以是相同的大写字符。</li>\n\t<li>若 <code>s[i]</code> 是大写字符,则 <code>s[i+1]</code> 不可以是相同的小写字符。</li>\n</ul>\n\n<p>请你将字符串整理好,每次你都可以从字符串中选出满足上述条件的 <strong>两个相邻</strong> 字符并删除,直到字符串整理好为止。</p>\n\n<p>请返回整理好的 <strong>字符串</strong> 。题目保证在给出的约束条件下,测试样例对应的答案是唯一的。</p>\n\n<p><strong>注意:</strong>空字符串也属于整理好的字符串,尽管其中没有任何字符。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"leEeetcode\"\n<strong>输出:</strong>\"leetcode\"\n<strong>解释:</strong>无论你第一次选的是 i = 1 还是 i = 2,都会使 \"leEeetcode\" 缩减为 \"leetcode\" 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"abBAcC\"\n<strong>输出:</strong>\"\"\n<strong>解释:</strong>存在多种不同情况,但所有的情况都会导致相同的结果。例如:\n\"abBAcC\" --> \"aAcC\" --> \"cC\" --> \"\"\n\"abBAcC\" --> \"abBA\" --> \"aA\" --> \"\"\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"s\"\n<strong>输出:</strong>\"s\"\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 100</code></li>\n\t<li><code>s</code> 只包含小写和大写英文字母</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 40,
|
||||
"likes": 41,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"22.4K\", \"totalSubmission\": \"40.6K\", \"totalAcceptedRaw\": 22424, \"totalSubmissionRaw\": 40637, \"acRate\": \"55.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"22.5K\", \"totalSubmission\": \"40.7K\", \"totalAcceptedRaw\": 22453, \"totalSubmissionRaw\": 40687, \"acRate\": \"55.2%\"}",
|
||||
"hints": [
|
||||
"The order you choose 2 characters to remove doesn't matter.",
|
||||
"Keep applying the mentioned step to s till the length of the string is not changed."
|
||||
|
Reference in New Issue
Block a user