mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 15:31:43 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定字典中的两个词,长度相等。写一个方法,把一个词转换成另一个词, 但是一次只能改变一个字符。每一步得到的新词都必须能在字典中找到。</p>\n\n<p>编写一个程序,返回一个可能的转换序列。如有多个可能的转换序列,你可以返回任何一个。</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>\nbeginWord = "hit",\nendWord = "cog",\nwordList = ["hot","dot","dog","lot","log","cog"]\n\n<strong>输出:</strong>\n["hit","hot","dot","lot","log","cog"]\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>\nbeginWord = "hit"\nendWord = "cog"\nwordList = ["hot","dot","dog","lot","log"]\n\n<strong>输出: </strong>[]\n\n<strong>解释:</strong> <em>endWord</em> "cog" 不在字典中,所以不存在符合要求的转换序列。</pre>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 52,
|
||||
"likes": 53,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"10.6K\", \"totalSubmission\": \"27.6K\", \"totalAcceptedRaw\": 10649, \"totalSubmissionRaw\": 27550, \"acRate\": \"38.7%\"}",
|
||||
"stats": "{\"totalAccepted\": \"11K\", \"totalSubmission\": \"28.4K\", \"totalAcceptedRaw\": 11007, \"totalSubmissionRaw\": 28438, \"acRate\": \"38.7%\"}",
|
||||
"hints": [
|
||||
"从一个蛮力的递归解法开始。只需要创建所有一次编辑的单词,检查它们是否在字典中,然后尝试该编辑路径。",
|
||||
"一旦你有了一个蛮力解法,就可以尝试找到一个更快的方法以得到所有一次编辑的有效单词。当绝大多数字符串都不是有效的字典单词时,你不会想创建所有一次编辑的字符串。",
|
||||
|
Reference in New Issue
Block a user