Python Easy to understand- 95% Faster
Please let me know if explanation is needed.\n\nclass Solution:\n    def exist(self, board: List[List[str]], word: str) -> bool:\n        m = len(board)\n      
Please let me know if explanation is needed.\n```\nclass Solution:\n    def exist(self, board: List[List[str]], word: str) -> bool:\n        m = len(board)\n        n = len(board[0])\n        for i in range(m):\n            for j in range(n):\n                if board[i][j] == word[0]:\n                    res = self.backtrack(board,m,n,i,j,word[1:])\n                    if res:\n                        return True\n        return False\n        \n        \n    def backtrack(self, board,m,n, i, j, target):\n        temp = board[i][j]\n        if len(target) == 0:\n            return True\n        board[i][j] = \'#\'\n        for x,y in (i+1,j),(i-1,j),(i,j+1),(i,j-1):\n            if 0<=x<m and 0<=y<n and target[0] == board[x][y]:\n                dec = self.backtrack(board,m,n,x,y,target[1:])\n                if dec:\n                    return True\n        board[i][j] = temp\n        return False\n```
['Python', 'Python3']