1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-25 14:58:56 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p><strong>独一无二的字符串</strong>&nbsp;指的是在一个数组中只出现过 <strong>一次</strong>&nbsp;的字符串。</p>\n\n<p>给你一个字符串数组&nbsp;<code>arr</code>&nbsp;和一个整数&nbsp;<code>k</code>&nbsp;,请你返回&nbsp;<code>arr</code>&nbsp;中第&nbsp;<code>k</code>&nbsp;个&nbsp;<strong>独一无二的字符串</strong>&nbsp;。如果&nbsp;<strong>少于</strong>&nbsp;<code>k</code>&nbsp;个独一无二的字符串,那么返回&nbsp;<strong>空字符串</strong>&nbsp;<code>\"\"</code>&nbsp;。</p>\n\n<p>注意,按照字符串在原数组中的 <strong>顺序</strong>&nbsp;找到第 <code>k</code>&nbsp;个独一无二字符串。</p>\n\n<p>&nbsp;</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>&nbsp;。</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>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= k &lt;= arr.length &lt;= 1000</code></li>\n\t<li><code>1 &lt;= arr[i].length &lt;= 5</code></li>\n\t<li><code>arr[i]</code>&nbsp;只包含小写英文字母。</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."
],