1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-03 06:22:54 +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;<code>pattern</code>&nbsp;得到待查询项&nbsp;<code>query</code>,那么待查询项与给定模式串匹配。(我们可以在任何位置插入每个字符,也可以插入 0 个字符。)</p>\n\n<p>给定待查询列表&nbsp;<code>queries</code>,和模式串&nbsp;<code>pattern</code>,返回由布尔值组成的答案列表&nbsp;<code>answer</code>。只有在待查项&nbsp;<code>queries[i]</code> 与模式串&nbsp;<code>pattern</code> 匹配时,&nbsp;<code>answer[i]</code>&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>queries = [&quot;FooBar&quot;,&quot;FooBarTest&quot;,&quot;FootBall&quot;,&quot;FrameBuffer&quot;,&quot;ForceFeedBack&quot;], pattern = &quot;FB&quot;\n<strong>输出:</strong>[true,false,true,true,false]\n<strong>示例:</strong>\n&quot;FooBar&quot; 可以这样生成:&quot;F&quot; + &quot;oo&quot; + &quot;B&quot; + &quot;ar&quot;。\n&quot;FootBall&quot; 可以这样生成:&quot;F&quot; + &quot;oot&quot; + &quot;B&quot; + &quot;all&quot;.\n&quot;FrameBuffer&quot; 可以这样生成:&quot;F&quot; + &quot;rame&quot; + &quot;B&quot; + &quot;uffer&quot;.</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre><strong>输入:</strong>queries = [&quot;FooBar&quot;,&quot;FooBarTest&quot;,&quot;FootBall&quot;,&quot;FrameBuffer&quot;,&quot;ForceFeedBack&quot;], pattern = &quot;FoBa&quot;\n<strong>输出:</strong>[true,false,true,false,false]\n<strong>解释:</strong>\n&quot;FooBar&quot; 可以这样生成:&quot;Fo&quot; + &quot;o&quot; + &quot;Ba&quot; + &quot;r&quot;.\n&quot;FootBall&quot; 可以这样生成:&quot;Fo&quot; + &quot;ot&quot; + &quot;Ba&quot; + &quot;ll&quot;.\n</pre>\n\n<p><strong>示例 3</strong></p>\n\n<pre><strong>输出:</strong>queries = [&quot;FooBar&quot;,&quot;FooBarTest&quot;,&quot;FootBall&quot;,&quot;FrameBuffer&quot;,&quot;ForceFeedBack&quot;], pattern = &quot;FoBaT&quot;\n<strong>输入:</strong>[false,true,false,false,false]\n<strong>解释: </strong>\n&quot;FooBarTest&quot; 可以这样生成:&quot;Fo&quot; + &quot;o&quot; + &quot;Ba&quot; + &quot;r&quot; + &quot;T&quot; + &quot;est&quot;.\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ol>\n\t<li><code>1 &lt;= queries.length &lt;= 100</code></li>\n\t<li><code>1 &lt;= queries[i].length &lt;= 100</code></li>\n\t<li><code>1 &lt;= pattern.length &lt;= 100</code></li>\n\t<li>所有字符串都仅由大写和小写英文字母组成。</li>\n</ol>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 43,
"likes": 44,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -155,7 +155,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"8.2K\", \"totalSubmission\": \"14.5K\", \"totalAcceptedRaw\": 8212, \"totalSubmissionRaw\": 14451, \"acRate\": \"56.8%\"}",
"stats": "{\"totalAccepted\": \"8.4K\", \"totalSubmission\": \"14.8K\", \"totalAcceptedRaw\": 8400, \"totalSubmissionRaw\": 14756, \"acRate\": \"56.9%\"}",
"hints": [
"Given a single pattern and word, how can we solve it?",
"One way to do it is using a DP (pos1, pos2) where pos1 is a pointer to the word and pos2 to the pattern and returns true if we can match the pattern with the given word.",