Given a 2D grid of letters and a target string, find all occurrences of the target string in the grid. The target string can be found horizontally, vertically, or diagonally in the grid, in a contiguous path.
Explanation: The target string 'AEH' cannot be found in the grid.
Explanation: The target string 'XYZ' cannot be found in the grid.
Explanation: The target string 'JKL' cannot be found in the grid.
Find word in grid via DFS backtracking
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak