Given a 2D grid of characters and a target string, determine if the target string can be constructed from adjacent characters in the grid, where each character in the grid can only be used once in the construction of the target string.
Explanation: The target string 'beg' can be constructed from the grid by moving from 'b' to 'e' to 'g'.
Explanation: The target string 'xyz' cannot be constructed from the grid as none of the characters 'x', 'y', or 'z' are present.
Find word in grid via DFS backtracking
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak