C++ || Concise DFS
\nbool dfs(vector<vector<char>>& board, int i, int j, string& word)\n    {\n        if(word.size() == 0) \n            return true;\n        if(i < 0 || i >= bo
```\nbool dfs(vector<vector<char>>& board, int i, int j, string& word)\n    {\n        if(word.size() == 0) \n            return true;\n        if(i < 0 || i >= board.size() || j < 0 || j >= board[0].size() || board[i][j] != word[0])\n            return false;\n        \n        char ch = board[i][j];\n        board[i][j] = \'*\';\n        string s = word.substr(1);\n        bool res = dfs(board, i-1, j, s) || dfs(board, i+1, j, s) || dfs(board, i, j-1, s) || dfs(board, i, j+1, s);\n        \n        board[i][j] = ch;\n        return res;\n    }\n    \n    bool exist(vector<vector<char>>& board, string word) \n    {\n        int m = board.size();\n        int n = board[0].size();\n        \n        for(int i = 0; i < m; i++)\n        {\n            for(int j = 0; j < n; j++)\n            {\n                if(dfs(board, i, j, word))\n                    return true;\n            }\n        }\n        \n        return false;\n    }\n```
['Depth-First Search', 'C', 'C++']