mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-25 14:58:56 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p><strong>独一无二的字符串</strong> 指的是在一个数组中只出现过 <strong>一次</strong> 的字符串。</p>\n\n<p>给你一个字符串数组 <code>arr</code> 和一个整数 <code>k</code> ,请你返回 <code>arr</code> 中第 <code>k</code> 个 <strong>独一无二的字符串</strong> 。如果 <strong>少于</strong> <code>k</code> 个独一无二的字符串,那么返回 <strong>空字符串</strong> <code>\"\"</code> 。</p>\n\n<p>注意,按照字符串在原数组中的 <strong>顺序</strong> 找到第 <code>k</code> 个独一无二字符串。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><b>输入:</b>arr = [\"d\",\"b\",\"c\",\"b\",\"c\",\"a\"], k = 2\n<b>输出:</b>\"a\"\n<strong>解释:</strong>\narr 中独一无二字符串包括 \"d\" 和 \"a\"<code> 。</code>\n\"d\" 首先出现,所以它是第 1 个独一无二字符串。\n\"a\" 第二个出现,所以它是 2 个独一无二字符串。\n由于 k == 2 ,返回 \"a\" 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><b>输入:</b>arr = [\"aaa\",\"aa\",\"a\"], k = 1\n<b>输出:</b>\"aaa\"\n<strong>解释:</strong>\narr 中所有字符串都是独一无二的,所以返回第 1 个字符串 \"aaa\" 。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><b>输入:</b>arr = [\"a\",\"b\",\"a\"], k = 3\n<b>输出:</b>\"\"\n<strong>解释:</strong>\n唯一一个独一无二字符串是 \"b\" 。由于少于 3 个独一无二字符串,我们返回空字符串 \"\" 。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= k <= arr.length <= 1000</code></li>\n\t<li><code>1 <= arr[i].length <= 5</code></li>\n\t<li><code>arr[i]</code> 只包含小写英文字母。</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 7,
|
||||
"likes": 8,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"5.7K\", \"totalSubmission\": \"7.8K\", \"totalAcceptedRaw\": 5680, \"totalSubmissionRaw\": 7802, \"acRate\": \"72.8%\"}",
|
||||
"stats": "{\"totalAccepted\": \"6K\", \"totalSubmission\": \"8.2K\", \"totalAcceptedRaw\": 5969, \"totalSubmissionRaw\": 8198, \"acRate\": \"72.8%\"}",
|
||||
"hints": [
|
||||
"Try 'mapping' the strings to check if they are unique or not."
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user