mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 19:31:42 +08:00
add leetcode problem-cn part1
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<p>On an alphabet board, we start at position <code>(0, 0)</code>, corresponding to character <code>board[0][0]</code>.</p>
|
||||
|
||||
|
||||
|
||||
<p>Here, <code>board = ["abcde", "fghij", "klmno", "pqrst", "uvwxy", "z"]</code>, as shown in the diagram below.</p>
|
||||
|
||||
|
||||
|
||||
<p><img alt="" src="https://assets.leetcode.com/uploads/2019/07/28/azboard.png" style="width: 250px; height: 317px;" /></p>
|
||||
|
||||
|
||||
|
||||
<p>We may make the following moves:</p>
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
|
||||
<li><code>'U'</code> moves our position up one row, if the position exists on the board;</li>
|
||||
|
||||
<li><code>'D'</code> moves our position down one row, if the position exists on the board;</li>
|
||||
|
||||
<li><code>'L'</code> moves our position left one column, if the position exists on the board;</li>
|
||||
|
||||
<li><code>'R'</code> moves our position right one column, if the position exists on the board;</li>
|
||||
|
||||
<li><code>'!'</code> adds the character <code>board[r][c]</code> at our current position <code>(r, c)</code> to the answer.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<p>(Here, the only positions that exist on the board are positions with letters on them.)</p>
|
||||
|
||||
|
Reference in New Issue
Block a user