摘要: Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such p 阅读全文
posted @ 2016-12-13 20:55 wxquare 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For 阅读全文
posted @ 2016-12-13 20:49 wxquare 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Trie 树的一个应用 Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string 阅读全文
posted @ 2016-12-13 20:44 wxquare 阅读(404) 评论(0) 推荐(0) 编辑
摘要: Trie 树实现 Implement a trie with insert, search, and startsWith methods. 参看:http://www.cnblogs.com/grandyang/p/4491665.html 阅读全文
posted @ 2016-12-13 20:42 wxquare 阅读(172) 评论(0) 推荐(0) 编辑