67. Word Search

Return true if word can be formed from letters of sequentially adjacent cells (up/down/left/right) in board. A cell may not be used twice in one word.

Example 1

Input: board = [["C","A","T"],["X","R","S"],["O","D","E"]], word = "CAR"
Output: true

Example 2

Input: board = [["C","A","T"],["X","R","S"],["O","D","E"]], word = "CATS"
Output: true
Hint 1

Try every cell as a start and DFS letter by letter.

Hint 2

Temporarily overwrite a cell to mark it as used, and restore it when you backtrack.

BacktrackingMatrix