1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-22 05:26:46 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>设想有个机器人坐在一个网格的左上角,网格 r 行 c 列。机器人只能向下或向右移动,但不能走到一些被禁止的网格(有障碍物)。设计一种算法,寻找机器人从左上角移动到右下角的路径。</p>\n\n<p><img src=\"https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2018/10/22/robot_maze.png\" style=\"height: 183px; width: 400px;\"></p>\n\n<p>网格中的障碍物和空位置分别用 <code>1</code> 和 <code>0</code> 来表示。</p>\n\n<p>返回一条可行的路径,路径由经过的网格的行号和列号组成。左上角为 0 行 0 列。如果没有可行的路径,返回空数组。</p>\n\n<p><strong>示例&nbsp;1:</strong></p>\n\n<pre><strong>输入:\n</strong>[\n&nbsp; [<strong>0</strong>,<strong>0</strong>,<strong>0</strong>],\n&nbsp; [0,1,<strong>0</strong>],\n&nbsp; [0,0,<strong>0</strong>]\n]\n<strong>输出:</strong> [[0,0],[0,1],[0,2],[1,2],[2,2]]\n<strong>解释: \n</strong>输入中标粗的位置即为输出表示的路径,即\n0行0列左上角 -&gt; 0行1列 -&gt; 0行2列 -&gt; 1行2列 -&gt; 2行2列右下角</pre>\n\n<p><strong>说明:</strong><em>r</em>&nbsp;和 <em>c </em>的值均不超过 100。</p>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 89,
"likes": 90,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
@@ -155,7 +155,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"15.3K\", \"totalSubmission\": \"42.4K\", \"totalAcceptedRaw\": 15338, \"totalSubmissionRaw\": 42418, \"acRate\": \"36.2%\"}",
"stats": "{\"totalAccepted\": \"16K\", \"totalSubmission\": \"44.4K\", \"totalAcceptedRaw\": 16020, \"totalSubmissionRaw\": 44361, \"acRate\": \"36.1%\"}",
"hints": [
"为了让机器人到最后一个格子,必须找出到倒数第二个格子的路径。为了到倒数第二个格子,必须找出到倒数第三个格子的路径。",
"首先明确是否有路径,以便稍微简化这个问题。然后,修改你的算法跟踪路径。",