Word Search
LeetCode 79 • Medium • Backtracking
Given a grid of letters and a word, return whether the word exists by moving to 4-directionally adjacent cells without reusing a cell. Use DFS + backtrack (mark visited, then unmark).
TimeO(m·n·3L)
SpaceO(L)
Step0/8
Ready
Board 2×3, word ABE. Orange = current path; gray = visited in this attempt.