mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-21 13:06:47 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个由不同字符组成的字符串 <code>allowed</code> 和一个字符串数组 <code>words</code> 。如果一个字符串的每一个字符都在 <code>allowed</code> 中,就称这个字符串是 <strong>一致字符串 </strong>。</p>\n\n<p>请你返回 <code>words</code> 数组中 <strong>一致字符串</strong> 的数目。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<b>输入:</b>allowed = \"ab\", words = [\"ad\",\"bd\",\"aaab\",\"baa\",\"badab\"]\n<b>输出:</b>2\n<b>解释:</b>字符串 \"aaab\" 和 \"baa\" 都是一致字符串,因为它们只包含字符 'a' 和 'b' 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<b>输入:</b>allowed = \"abc\", words = [\"a\",\"b\",\"c\",\"ab\",\"ac\",\"bc\",\"abc\"]\n<b>输出:</b>7\n<b>解释:</b>所有字符串都是一致的。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<b>输入:</b>allowed = \"cad\", words = [\"cc\",\"acd\",\"b\",\"ba\",\"bac\",\"bad\",\"ac\",\"d\"]\n<b>输出:</b>4\n<b>解释:</b>字符串 \"cc\",\"acd\",\"ac\" 和 \"d\" 是一致字符串。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= words.length <= 10<sup>4</sup></code></li>\n\t<li><code>1 <= allowed.length <=<sup> </sup>26</code></li>\n\t<li><code>1 <= words[i].length <= 10</code></li>\n\t<li><code>allowed</code> 中的字符 <strong>互不相同</strong> 。</li>\n\t<li><code>words[i]</code> 和 <code>allowed</code> 只包含小写英文字母。</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 23,
|
||||
"likes": 24,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"20.4K\", \"totalSubmission\": \"24.7K\", \"totalAcceptedRaw\": 20408, \"totalSubmissionRaw\": 24744, \"acRate\": \"82.5%\"}",
|
||||
"stats": "{\"totalAccepted\": \"21K\", \"totalSubmission\": \"25.5K\", \"totalAcceptedRaw\": 21024, \"totalSubmissionRaw\": 25490, \"acRate\": \"82.5%\"}",
|
||||
"hints": [
|
||||
"A string is incorrect if it contains a character that is not allowed",
|
||||
"Constraints are small enough for brute force"
|
||||
|
Reference in New Issue
Block a user