:type board: List[List[str]] :type word: str :rtype: bool
(self, board, word)
| 191 | class Solution(object): |
| 192 | |
| 193 | def exist(self, board, word): |
| 194 | """ |
| 195 | :type board: List[List[str]] |
| 196 | :type word: str |
| 197 | :rtype: bool |
| 198 | """ |
| 199 | for i, d in enumerate(board): |
| 200 | for i2, d2 in enumerate(d): |
| 201 | if d2 == word[0]: |
| 202 | if self.search(board, i2, i, word): |
| 203 | return True |
| 204 | return False |
| 205 | |
| 206 | def search(self, board, x, y, word): |
| 207 | """ |