C++ || DFS || Backtracking || easy Solution
\nclass Solution {\npublic:\n    bool search(int index,int i,int j,vector<vector<char>> &board, string word){\n        if(index == word.size()){\n            re
```\nclass Solution {\npublic:\n    bool search(int index,int i,int j,vector<vector<char>> &board, string word){\n        if(index == word.size()){\n            return true;\n        }\n        if(i<0 || j<0 || i >= board.size() || j >= board[0].size()){\n            return false;\n        }\n        bool ans = false;\n        if(word[index] == board[i][j]){\n            board[i][j] = \'*\';\n            \n            ans = search(index+1,i+1,j,board,word) || search(index+1,i,j+1,board,word) || \n                search(index+1,i-1,j,board,word) ||search(index+1,i,j-1,board,word);\n            \n            board[i][j] = word[index];\n        }\n        return ans;\n    }\n    \n    bool exist(vector<vector<char>>& board, string word) {\n        int m = board[0].size();\n        int n = board.size();\n         int index  = 0;\n        \n        bool ans = false;\n        \n        for(int i=0;i<n;i++){\n            for(int j=0;j<m;j++){\n                if(word[index] == board[i][j]){\n                    if(search(index,i,j,board,word)){\n                        return true;\n                    }\n                }\n            }\n        }\n        return ans;\n    }\n};\n```\n**Please upvote if it was helpful for you, thank you!**
['Depth-First Search', 'Recursion', 'C']