1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-22 05:26:46 +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>给你一个整数数组&nbsp;<code>arr</code>,请你帮忙统计数组中每个数的出现次数。</p>\n\n<p>如果每个数的出现次数都是独一无二的,就返回&nbsp;<code>true</code>;否则返回 <code>false</code>。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre><strong>输入:</strong>arr = [1,2,2,1,1,3]\n<strong>输出:</strong>true\n<strong>解释:</strong>在该数组中1 出现了 3 次2 出现了 2 次3 只出现了 1 次。没有两个数的出现次数相同。</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre><strong>输入:</strong>arr = [1,2]\n<strong>输出:</strong>false\n</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre><strong>输入:</strong>arr = [-3,0,1,-3,1,1,1,-3,10,0]\n<strong>输出:</strong>true\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= arr.length&nbsp;&lt;= 1000</code></li>\n\t<li><code>-1000 &lt;= arr[i] &lt;= 1000</code></li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 133,
"likes": 134,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -143,7 +143,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"63.3K\", \"totalSubmission\": \"86.8K\", \"totalAcceptedRaw\": 63282, \"totalSubmissionRaw\": 86781, \"acRate\": \"72.9%\"}",
"stats": "{\"totalAccepted\": \"63.9K\", \"totalSubmission\": \"87.7K\", \"totalAcceptedRaw\": 63940, \"totalSubmissionRaw\": 87694, \"acRate\": \"72.9%\"}",
"hints": [
"Find the number of occurrences of each element in the array using a hash map.",
"Iterate through the hash map and check if there is a repeated value."