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-03-29 16:56:27 +08:00
parent e730aa6794
commit ad15da05aa
2517 changed files with 7358 additions and 7332 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>给你一个字符串&nbsp;<code>s</code>&nbsp;和一个字符规律&nbsp;<code>p</code>,请你来实现一个支持 <code>'.'</code>&nbsp;和&nbsp;<code>'*'</code>&nbsp;的正则表达式匹配。</p>\n\n<ul>\n\t<li><code>'.'</code> 匹配任意单个字符</li>\n\t<li><code>'*'</code> 匹配零个或多个前面的那一个元素</li>\n</ul>\n\n<p>所谓匹配,是要涵盖&nbsp;<strong>整个&nbsp;</strong>字符串&nbsp;<code>s</code>的,而不是部分字符串。</p>\n&nbsp;\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"aa\", p = \"a\"\n<strong>输出:</strong>false\n<strong>解释:</strong>\"a\" 无法匹配 \"aa\" 整个字符串。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"aa\", p = \"a*\"\n<strong>输出:</strong>true\n<strong>解释:</strong>因为 '*' 代表可以匹配零个或多个前面的那一个元素, 在这里前面的元素就是 'a'。因此,字符串 \"aa\" 可被视为 'a' 重复了一次。\n</pre>\n\n<p><strong>示例&nbsp;3</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"ab\", p = \".*\"\n<strong>输出:</strong>true\n<strong>解释:</strong>\".*\" 表示可匹配零个或多个('*')任意字符('.')。\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= s.length&nbsp;&lt;= 20</code></li>\n\t<li><code>1 &lt;= p.length&nbsp;&lt;= 30</code></li>\n\t<li><code>s</code>&nbsp;只包含从&nbsp;<code>a-z</code>&nbsp;的小写字母。</li>\n\t<li><code>p</code>&nbsp;只包含从&nbsp;<code>a-z</code>&nbsp;的小写字母,以及字符&nbsp;<code>.</code>&nbsp;和&nbsp;<code>*</code>。</li>\n\t<li>保证每次出现字符&nbsp;<code>*</code> 时,前面都匹配到有效的字符</li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 2853,
"likes": 2857,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Wildcard Matching\", \"titleSlug\": \"wildcard-matching\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u901a\\u914d\\u7b26\\u5339\\u914d\"}]",
@@ -149,7 +149,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"255.6K\", \"totalSubmission\": \"808.8K\", \"totalAcceptedRaw\": 255639, \"totalSubmissionRaw\": 808757, \"acRate\": \"31.6%\"}",
"stats": "{\"totalAccepted\": \"256.6K\", \"totalSubmission\": \"811.6K\", \"totalAcceptedRaw\": 256611, \"totalSubmissionRaw\": 811569, \"acRate\": \"31.6%\"}",
"hints": [],
"solution": null,
"status": null,