Word Search Java Solution || Easy Recursive Approach || T.C :- O(m * n)
\nclass Solution {\n    public boolean exist(char[][] board, String word) {\n\t\n\t//finding first character of given word in given matrix \n        for(int i=0
```\nclass Solution {\n    public boolean exist(char[][] board, String word) {\n\t\n\t//finding first character of given word in given matrix \n        for(int i=0; i<board.length; i++)\n        {\n            for(int j=0; j<board[0].length; j++)\n            {\n\t\t\t//if first character found then we call recursion for remaining task else return false\n                if(board[i][j]==word.charAt(0)){\n                 if(helper(board,word,0,i,j,board.length,board[0].length))\n                     return true;\n                }\n            }\n        }\n       return false;\n    }\n    boolean helper(char[][] board, String word,int index,int i,int j, int rowLen,int colLen)\n    {\n    \n        if(index==word.length())\n        return true;\n        \n        if(i<0 || j<0 || i == rowLen || j == colLen || board[i][j] != word.charAt(index))\n            return false;\n        \n\t\t// mark that character cell so that we can\'t revisit that cell to avoid infinity calls\n            char temp = board[i][j];\n            board[i][j] = \'#\';\n            boolean ans1 = helper(board,word,index+1,i,j+1,rowLen,colLen);\n            boolean ans2 = helper(board,word,index+1,i+1,j,rowLen,colLen);\n            boolean ans3 = helper(board,word,index+1,i-1,j,rowLen,colLen);\n            boolean ans4 = helper(board,word,index+1,i,j-1,rowLen,colLen);\n            board[i][j] = temp;\n            return ans1 || ans2 || ans3 || ans4;\n        \n    \n    }\n}\nT.C :- O(m * n), m and n are the numbe rof row and column , at max for finding word we have to traverse whole matrix cell\n```
['Java']