mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>哦,不!你不小心把一个长篇文章中的空格、标点都删掉了,并且大写也弄成了小写。像句子<code>"I reset the computer. It still didn’t boot!"</code>已经变成了<code>"iresetthecomputeritstilldidntboot"</code>。在处理标点符号和大小写之前,你得先把它断成词语。当然了,你有一本厚厚的词典<code>dictionary</code>,不过,有些词没在词典里。假设文章用<code>sentence</code>表示,设计一个算法,把文章断开,要求未识别的字符最少,返回未识别的字符数。</p>\n\n<p><strong>注意:</strong>本题相对原题稍作改动,只需返回未识别的字符数</p>\n\n<p> </p>\n\n<p><strong>示例:</strong></p>\n\n<pre><strong>输入:</strong>\ndictionary = ["looked","just","like","her","brother"]\nsentence = "jesslookedjustliketimherbrother"\n<strong>输出:</strong> 7\n<strong>解释:</strong> 断句后为"<strong>jess</strong> looked just like <strong>tim</strong> her brother",共7个未识别字符。\n</pre>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>0 <= len(sentence) <= 1000</code></li>\n\t<li><code>dictionary</code>中总字符数不超过 150000。</li>\n\t<li>你可以认为<code>dictionary</code>和<code>sentence</code>中只包含小写字母。</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 216,
|
||||
"likes": 217,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -179,7 +179,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"29.5K\", \"totalSubmission\": \"53.2K\", \"totalAcceptedRaw\": 29474, \"totalSubmissionRaw\": 53232, \"acRate\": \"55.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"29.5K\", \"totalSubmission\": \"53.2K\", \"totalAcceptedRaw\": 29477, \"totalSubmissionRaw\": 53238, \"acRate\": \"55.4%\"}",
|
||||
"hints": [
|
||||
"试试递归方法。",
|
||||
"你能把所有的可能性都试一试吗?那会是什么样子?",
|
||||
|
Reference in New Issue
Block a user