[LeetCode] Alphabet Board Path

1 · · Feb. 19, 2022, 11:57 a.m.
1138. Alphabet Board Path On an alphabet board, we start at position (0, 0), corresponding to character board[0][0]. Here, board = [“abcde”, “fghij”, “klmno”, “pqrst”, “uvwxy”, “z”], as shown in the diagram below. We may make the following moves: ‘U’ moves our position up one row, if the position exists on the board; ‘D’ moves our position down one row, if the position exists on the board; ‘L’ moves our position left one column, if the position exists on the board; ‘R’ moves our position right...