This question evaluates algorithmic problem-solving and implementation skills in grid-based search, including concepts like graph traversal and backtracking; it falls under Coding & Algorithms and primarily assesses practical application and state-management implementation rather than only conceptual understanding.
Given an m x n grid of characters board and a string word, determine whether word can be constructed from sequentially adjacent cells.
Rules:
board
: 2D array of characters
word
: target string
true
if
word
exists in the grid by the rules above, else
false
.
board = [[A,B,C,E],[S,F,C,S],[A,D,E,E]], word = "ABCCED" → true
1 ≤ m, n ≤ 12
1 ≤ |word| ≤ m*n