Given an m x n grid of characters board and a string word, return true if word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once.
Example 1
Input: board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = ABCCED
Output: true
Explanation: Start at A (0,0), go right to B and C, down to C (1,2), down to E (2,2) and left to D (2,1). Each step moves to an adjacent cell, and no cell is reused.
Example 2
Input: board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = SEE
Output: true
Explanation: Start at S (1,3), go down to E (2,3), then left to E (2,2).
Example 3
Input: board = [["A","B","C","E"],["S","F","C","S"],["A","D","E","E"]], word = ABCB
Output: false
Explanation: After A → B → C, the only B is the one already used, and a cell cannot be used twice. So "ABCB" cannot be formed.
From each cell matching the first letter, DFS to see if the word can be spelled by visiting adjacent unvisited cells.
Run checks all cases above. Submit evaluates all test cases.