Search
⌘K

Leetcode 1138. Alphabet Board Path

Convert each target letter to its board coordinates and output a shortest sequence of moves (U/D/L/R) plus '!' to spell the string by walking between coordinates. The core challenge is respecting the board's uneven shape—especially the lone 'z' at (5,0)—so you must order vertical/horizontal moves carefully to avoid invalid positions.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.