mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 13:36:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给定一个 <code>m x n</code> 二维字符网格 <code>board</code><strong> </strong>和一个单词(字符串)列表 <code>words</code>, <em>返回所有二维网格上的单词</em> 。</p>\n\n<p>单词必须按照字母顺序,通过 <strong>相邻的单元格</strong> 内的字母构成,其中“相邻”单元格是那些水平相邻或垂直相邻的单元格。同一个单元格内的字母在一个单词中不允许被重复使用。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2020/11/07/search1.jpg\" />\n<pre>\n<strong>输入:</strong>board = [[\"o\",\"a\",\"a\",\"n\"],[\"e\",\"t\",\"a\",\"e\"],[\"i\",\"h\",\"k\",\"r\"],[\"i\",\"f\",\"l\",\"v\"]], words = [\"oath\",\"pea\",\"eat\",\"rain\"]\n<strong>输出:</strong>[\"eat\",\"oath\"]\n</pre>\n\n<p><strong>示例 2:</strong></p>\n<img alt=\"\" src=\"https://assets.leetcode.com/uploads/2020/11/07/search2.jpg\" />\n<pre>\n<strong>输入:</strong>board = [[\"a\",\"b\"],[\"c\",\"d\"]], words = [\"abcb\"]\n<strong>输出:</strong>[]\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>m == board.length</code></li>\n\t<li><code>n == board[i].length</code></li>\n\t<li><code>1 <= m, n <= 12</code></li>\n\t<li><code>board[i][j]</code> 是一个小写英文字母</li>\n\t<li><code>1 <= words.length <= 3 * 10<sup>4</sup></code></li>\n\t<li><code>1 <= words[i].length <= 10</code></li>\n\t<li><code>words[i]</code> 由小写英文字母组成</li>\n\t<li><code>words</code> 中的所有字符串互不相同</li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 636,
|
||||
"likes": 647,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Word Search\", \"titleSlug\": \"word-search\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u5355\\u8bcd\\u641c\\u7d22\"}, {\"title\": \"Unique Paths III\", \"titleSlug\": \"unique-paths-iii\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u4e0d\\u540c\\u8def\\u5f84 III\"}]",
|
||||
@@ -161,7 +161,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"71.9K\", \"totalSubmission\": \"156.2K\", \"totalAcceptedRaw\": 71867, \"totalSubmissionRaw\": 156203, \"acRate\": \"46.0%\"}",
|
||||
"stats": "{\"totalAccepted\": \"73.6K\", \"totalSubmission\": \"160.7K\", \"totalAcceptedRaw\": 73598, \"totalSubmissionRaw\": 160678, \"acRate\": \"45.8%\"}",
|
||||
"hints": [
|
||||
"You would need to optimize your backtracking to pass the larger test. Could you stop backtracking earlier?",
|
||||
"If the current candidate does not exist in all words' prefix, you could stop backtracking immediately. What kind of data structure could answer such query efficiently? Does a hash table work? Why or why not? How about a Trie? If you would like to learn how to implement a basic trie, please work on this problem: <a href=\"https://leetcode.com/problems/implement-trie-prefix-tree/\">Implement Trie (Prefix Tree)</a> first."
|
||||
|
Reference in New Issue
Block a user