public List<String> findWords(char[][] board, String[] words) {
        List<String> result = new ArrayList<String>();
        if (board.length == 0)
            return result;
        boolean[][] visited = new boolean[board.length][board[0].length];
        Trie trie = new Trie();
        for (String s : words) {
            trie.insert(s);
        }
        for (int i = 0; i < board.length; ++i) {
            for (int j = 0; j < board[0].length; ++j) {
                dfs(board, visited, "", i, j, trie);
            }
        }
        return new ArrayList<String>(res);
    }