1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 23:11:41 +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>words</code> 组成的一本英语词典。返回&nbsp;<code>words</code> 中最长的一个单词,该单词是由&nbsp;<code>words</code>&nbsp;词典中其他单词逐步添加一个字母组成。</p>\n\n<p>若其中有多个可行的答案,则返回答案中字典序最小的单词。若无答案,则返回空字符串。</p>\n\n<p>&nbsp;</p>\n\n<p><strong>示例 1</strong></p>\n\n<pre>\n<strong>输入:</strong>words = [\"w\",\"wo\",\"wor\",\"worl\", \"world\"]\n<strong>输出:</strong>\"world\"\n<strong>解释:</strong> 单词\"world\"可由\"w\", \"wo\", \"wor\", 和 \"worl\"逐步添加一个字母组成。\n</pre>\n\n<p><strong>示例 2</strong></p>\n\n<pre>\n<strong>输入:</strong>words = [\"a\", \"banana\", \"app\", \"appl\", \"ap\", \"apply\", \"apple\"]\n<strong>输出:</strong>\"apple\"\n<strong>解释:</strong>\"apply\" 和 \"apple\" 都能由词典中的单词组成。但是 \"apple\" 的字典序小于 \"apply\" \n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= words.length &lt;= 1000</code></li>\n\t<li><code>1 &lt;= words[i].length &lt;= 30</code></li>\n\t<li>所有输入的字符串&nbsp;<code>words[i]</code>&nbsp;都只包含小写字母。</li>\n</ul>\n",
"isPaidOnly": false,
"difficulty": "Easy",
"likes": 296,
"likes": 297,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Longest Word in Dictionary through Deleting\", \"titleSlug\": \"longest-word-in-dictionary-through-deleting\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u901a\\u8fc7\\u5220\\u9664\\u5b57\\u6bcd\\u5339\\u914d\\u5230\\u5b57\\u5178\\u91cc\\u6700\\u957f\\u5355\\u8bcd\"}, {\"title\": \"Implement Magic Dictionary\", \"titleSlug\": \"implement-magic-dictionary\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u5b9e\\u73b0\\u4e00\\u4e2a\\u9b54\\u6cd5\\u5b57\\u5178\"}]",
@@ -161,7 +161,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"55.8K\", \"totalSubmission\": \"107.3K\", \"totalAcceptedRaw\": 55793, \"totalSubmissionRaw\": 107280, \"acRate\": \"52.0%\"}",
"stats": "{\"totalAccepted\": \"55.9K\", \"totalSubmission\": \"107.5K\", \"totalAcceptedRaw\": 55924, \"totalSubmissionRaw\": 107526, \"acRate\": \"52.0%\"}",
"hints": [
"For every word in the input list, we can check whether all prefixes of that word are in the input list by using a Set."
],