Swift Solution -- Clean & Easy Understand
\nclass Solution {\n    func exist(_ board: [[Character]], _ word: String) -> Bool {\n        guard board.count != 0, board[0].count != 0, word.count != 0 else 
```\nclass Solution {\n    func exist(_ board: [[Character]], _ word: String) -> Bool {\n        guard board.count != 0, board[0].count != 0, word.count != 0 else { return false }\n        \n        let word = Array(word)\n        let rows = board.count, cols = board[0].count\n        var isVisited = Array(repeating: Array(repeating: false, count: cols), count: rows)\n        \n        for row in 0..<rows {\n            for col in 0..<cols where board[row][col] == word.first {\n                if check(board, word, row, col, 0, &isVisited) {\n                    return true\n                }\n            }\n        }\n        return false\n    }\n    \n    func check(_ board: [[Character]], _ word: [Character], _ row: Int, _ col: Int, _ index: Int, _ isVisited: inout [[Bool]]) -> Bool {\n        // check if reached the end\n        guard index < word.count else { return true }\n        \n        // check if it match requirements\n        guard   row >= 0, \n                row < board.count, \n                col >= 0, \n                col < board[0].count,\n                !isVisited[row][col],\n                board[row][col] == word[index]\n                else { return false }\n        \n        // once we found matched case, we mark isVisited as true\n        isVisited[row][col] = true\n        \n        // try each way, to find if there any valid path\n        let hasValidPath =  check(board, word, row-1, col, index+1, &isVisited) ||  // go up\n                            check(board, word, row+1, col, index+1, &isVisited) ||  // go down\n                            check(board, word, row, col-1, index+1, &isVisited) ||  // go left\n                            check(board, word, row, col+1, index+1, &isVisited)     // go right\n        \n        // reset isVisited after each DFS search, for re use\n        isVisited[row][col] = false\n        \n        return hasValidPath\n    }\n}\n```
['Backtracking', 'Swift']