mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 05:26:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个字符串 <code>s</code> 和一个字符规律 <code>p</code>,请你来实现一个支持 <code>'.'</code> 和 <code>'*'</code> 的正则表达式匹配。</p>\n\n<ul>\n\t<li><code>'.'</code> 匹配任意单个字符</li>\n\t<li><code>'*'</code> 匹配零个或多个前面的那一个元素</li>\n</ul>\n\n<p>所谓匹配,是要涵盖 <strong>整个 </strong>字符串 <code>s</code>的,而不是部分字符串。</p>\n \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>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>s = \"ab\", p = \".*\"\n<strong>输出:</strong>true\n<strong>解释:</strong>\".*\" 表示可匹配零个或多个('*')任意字符('.')。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 20</code></li>\n\t<li><code>1 <= p.length <= 30</code></li>\n\t<li><code>s</code> 只包含从 <code>a-z</code> 的小写字母。</li>\n\t<li><code>p</code> 只包含从 <code>a-z</code> 的小写字母,以及字符 <code>.</code> 和 <code>*</code>。</li>\n\t<li>保证每次出现字符 <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,
|
||||
|
Reference in New Issue
Block a user