mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-23 05:48:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个字符串 <code>s</code> ,请你去除字符串中重复的字母,使得每个字母只出现一次。需保证 <strong>返回结果的字典序最小</strong>(要求不能打乱其他字符的相对位置)。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong><code>s = \"bcabc\"</code>\n<strong>输出<code>:</code></strong><code>\"abc\"</code>\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong><code>s = \"cbacdcbc\"</code>\n<strong>输出:</strong><code>\"acdb\"</code></pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 10<sup>4</sup></code></li>\n\t<li><code>s</code> 由小写英文字母组成</li>\n</ul>\n\n<p> </p>\n\n<p><strong>注意:</strong>该题与 1081 <a href=\"https://leetcode-cn.com/problems/smallest-subsequence-of-distinct-characters\">https://leetcode-cn.com/problems/smallest-subsequence-of-distinct-characters</a> 相同</p>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 693,
|
||||
"likes": 712,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"81.5K\", \"totalSubmission\": \"170.6K\", \"totalAcceptedRaw\": 81531, \"totalSubmissionRaw\": 170590, \"acRate\": \"47.8%\"}",
|
||||
"stats": "{\"totalAccepted\": \"85.3K\", \"totalSubmission\": \"178.2K\", \"totalAcceptedRaw\": 85260, \"totalSubmissionRaw\": 178229, \"acRate\": \"47.8%\"}",
|
||||
"hints": [
|
||||
"Greedily try to add one missing character. How to check if adding some character will not cause problems ? Use bit-masks to check whether you will be able to complete the sub-sequence if you add the character at some index i."
|
||||
],
|
||||
|
Reference in New Issue
Block a user