C++ Simple and Clean DFS Solution
\nclass Solution {\npublic:\n    bool startsHere(vector<vector<char>>& board, int x, int y, string& word, int idx) {\n        if (idx == word.size()) return tru
```\nclass Solution {\npublic:\n    bool startsHere(vector<vector<char>>& board, int x, int y, string& word, int idx) {\n        if (idx == word.size()) return true;\n        if (x < 0 || x >= board.size() || y < 0 || y >= board[0].size() || \n            board[x][y] == \'.\' || board[x][y] != word[idx]) return false;\n        \n        char c = board[x][y];\n        board[x][y] = \'.\';\n        bool res = startsHere(board, x+1, y, word, idx+1) ||\n                   startsHere(board, x-1, y, word, idx+1) ||\n                   startsHere(board, x, y+1, word, idx+1) ||\n                   startsHere(board, x, y-1, word, idx+1);\n        board[x][y] = c;\n        return res;\n    }\n    \n    bool exist(vector<vector<char>>& board, string word) {\n        for (int i = 0; i < board.size(); i++) {\n            for (int j = 0; j < board[0].size(); j++) {\n                if (startsHere(board, i, j, word, 0)) return true;\n            }\n        }\n        return false;\n    }\n};\n```\n**Like it? please upvote!**
['C']