simple c++ solution | Backtracking | DFS
\nclass Solution {\npublic:\n    bool issafe(vector<vector<char>>& board,int i, int j,string word, int k){\n        if(board[i][j]==word[k]){\n            retur
```\nclass Solution {\npublic:\n    bool issafe(vector<vector<char>>& board,int i, int j,string word, int k){\n        if(board[i][j]==word[k]){\n            return true;\n        }\n        return false;\n    }\n    \n    bool solve(vector<vector<char>>& board,int i, int j,int m,int n,string word, int k){\n        if(k==word.size()){\n            return true;\n        }\n        if(i < 0 || i == m || j < 0 || j == n){\n            return false;\n        }\n        if(issafe(board,i,j,word,k)){\n            char temp=board[i][j];\n            board[i][j]=\'0\';\n            if((solve(board,i+1,j,m,n,word,k+1) || solve(board,i-1,j,m,n,word,k+1) || solve(board,i,j+1,m,n,word,k+1) || solve(board,i,j-1,m,n,word,k+1))){\n                return true;\n            }\n            //backtracking\n             board[i][j]=temp;\n        }\n        \n        return false;\n    }\n    bool exist(vector<vector<char>>& board, string word) {\n        int m=board.size();\n        int n=board[0].size();\n        int k=0;\n        for(int i=0;i<m;i++){\n            for(int j=0;j<n;j++){\n                if(solve(board,i,j,m,n,word,k)){\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n};\n```\nPlease **UPVOTE**
['Backtracking', 'Depth-First Search', 'C']