DiffPush Tier Recursion · Try Out All Combos O(M * N * 4^L) — every cell can seed a walk of L letters · O(L) recursion depth
A dispatch switchboard lays out letters in a grid, and a courier's call sign must be traced as a path through adjacent cells — stepping up, down, left, or right without reusing a cell. An operator starts on any cell matching the first letter, marks it taken, and probes onward for each following letter, un-marking on the way back so other routes stay available.
Input: A grid board of characters and the target string word.
Output: true when some adjacent-cell path spells word, false otherwise.
1 <= board.length, board[i].length <= 61 <= word.length <= 15board and word consist of letters and digitsInput: {"board":[["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]],"word":"ABCCED"}
Output: true
The path A→B→C→C→E→D snakes through the left half of the grid.
Input: {"board":[["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]],"word":"ABCB"}
Output: false
Reaching B after C would require reusing the starting cell, which the no-revisit rule forbids.