Algorithm · Uber · Medium
Given an m x n grid of characters board and a string word, return true if word can be constructed by navigating through the grid starting from any cell. You may move to any adjacent cell horizontally or vertically. Each cell can be used at most once in the sequence. Examples Example 1 Explanation: Start at 'A' (0,0) → 'B' (0,1) (right) → 'E' (1,1) (down). No cell is reused. Example 2 Explanation: Start at top-left 'A' (0,0) → bottom-left 'A' (1,0) (down) → 'D' (1,1) (right).…
Checking your access…