1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-05 23:41:41 +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>words</code>&nbsp;和一张『字母表』(字符串)&nbsp;<code>chars</code>。</p>\n\n<p>假如你可以用&nbsp;<code>chars</code>&nbsp;中的『字母』(字符)拼写出 <code>words</code>&nbsp;中的某个『单词』(字符串),那么我们就认为你掌握了这个单词。</p>\n\n<p>注意:每次拼写(指拼写词汇表中的一个单词)时,<code>chars</code> 中的每个字母都只能用一次。</p>\n\n<p>返回词汇表&nbsp;<code>words</code>&nbsp;中你掌握的所有单词的 <strong>长度之和</strong>。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre><strong>输入:</strong>words = [&quot;cat&quot;,&quot;bt&quot;,&quot;hat&quot;,&quot;tree&quot;], chars = &quot;atach&quot;\n<strong>输出:</strong>6\n<strong>解释: </strong>\n可以形成字符串 &quot;cat&quot; 和 &quot;hat&quot;,所以答案是 3 + 3 = 6。\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre><strong>输入:</strong>words = [&quot;hello&quot;,&quot;world&quot;,&quot;leetcode&quot;], chars = &quot;welldonehoneyr&quot;\n<strong>输出:</strong>10\n<strong>解释:</strong>\n可以形成字符串 &quot;hello&quot; 和 &quot;world&quot;,所以答案是 5 + 5 = 10。\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n\t<li><code>1 &lt;= words.length &lt;= 1000</code></li>\n\t<li><code>1 &lt;= words[i].length, chars.length&nbsp;&lt;= 100</code></li>\n\t<li>所有字符串中都仅包含小写英文字母</li>\n</ol>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 153,
"likes": 154,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"63.5K\", \"totalSubmission\": \"92.7K\", \"totalAcceptedRaw\": 63492, \"totalSubmissionRaw\": 92658, \"acRate\": \"68.5%\"}",
"stats": "{\"totalAccepted\": \"64.5K\", \"totalSubmission\": \"94.1K\", \"totalAcceptedRaw\": 64495, \"totalSubmissionRaw\": 94137, \"acRate\": \"68.5%\"}",
"hints": [
"Solve the problem for each string in <code>words</code> independently.",
"Now try to think in frequency of letters.",