Easy Python Solution : 90.29 beats% || With Comments
Code\n\nclass Solution:\n    def exist(self, board: List[List[str]], word: str) -> bool:\n        ROWS, COLS = len(board), len(board[0])\n        visited = set(
# Code\n```\nclass Solution:\n    def exist(self, board: List[List[str]], word: str) -> bool:\n        ROWS, COLS = len(board), len(board[0])\n        visited = set()\n\n        def dfs(r,c,idx):\n        # if idx == len(word), then word has been found\n            if idx == len(word):\n                return True\n\n        # out of bounds\n        # OR current letter does not match letter on board\n        # OR letter already visited\n            if ( \n                r<0 or r>=ROWS \n                or c<0 or c>=COLS\n                or word[idx] != board[r][c]\n                or (r,c) in visited\n            ):\n                return False\n  \n        # to keep track of the letter already visited, add it\'s position to the set\n        # after DFS we can remove it from the set.\n            visited.add((r,c))\n\n        # performing DFS \n            res = (\n                dfs(r+1,c,idx+1) \n                or dfs(r-1,c,idx+1) \n                or dfs(r,c+1,idx+1) \n                or dfs(r,c-1,idx+1)\n            )\n        \n            visited.remove((r,c))\n            return res\n        \n        for i in range(ROWS):\n            for j in range(COLS):\n                if dfs(i,j,0):\n                    return True\n        return False\n\n```
['Backtracking', 'Depth-First Search', 'Recursion', 'Python3']