Given an m × n grid of characters board and a string word, return true if word exists in the grid. The word must be constructed from letters of adjacent cells (horizontally or vertically neighboring), and each cell may be used at most ONCE in a single path.
The “each cell only once” rule is what forces you to REMEMBER the path. Without it, the grid is just a lookup — with it, you need a visited-set that grows on entry and shrinks on backtrack.
A grid of letters. A target word. Walk between adjacent cells to spell it, but each cell can only appear once in the path. Simple enough — but watch what that “only once” forces you to remember as you go.
Try it: tap cells on this 3×4 board to spell ABCCED. Start anywhere. Adjacent means up, down, left, or right — never diagonal. No cell twice.