public List<String> findWords(char[][] board, String[] words) {
		if (board.length == 0 || board[0].length == 0 || words.length == 0) {
			return new ArrayList<String>();
		}
		TrieNode root = new TrieNode(false);
		for (String word : words) {
			char[] str = word.toCharArray();
			TrieNode cur = root;
			for (int i = 0; i < str.length; i++) {
				char c = str[i];
				if (cur.children.containsKey(c)) {
					cur = cur.children.get(c);
				} else {
					TrieNode next = new TrieNode(false);
					cur.children.put(c, next);
					cur = next;
				}
			}
			cur.isWord = true;
		}
		boolean[][] isVisited = new boolean[board.length][board[0].length];
		for (int i = 0; i < board.length; i++) {
			for (int j = 0; j < board[0].length; j++) {
				char c = board[i][j];
				if (root.children.containsKey(c)) {
					isVisited[i][j] = true;
					dfs(board, root.children.get(c), i, j, String.valueOf(c),
							isVisited);
					isVisited[i][j] = false;
				}
			}
		}
		return new ArrayList<String>(result);
	}