LeetCode之字典树
黄焖鸡米饭啊
嗯。
展开
-
Add_and_Search_Word_Data_structure_design
题目描述: Design a data structure that supports the following two operations: void addWord(word) bool search(word)search(word) can search a literal word or a regular expression string contain原创 2017-09-12 11:28:47 · 270 阅读 · 0 评论 -
Implement_Trie_(Prefix_Tree)
题目描述:Implement a trie(单词查找树:利用字符串的公共前缀来节约存储空间) with insert, search, and startsWith methods.Note: You may assume that all inputs are consist of lowercase letters a-z.思路:全在注释里。public class Im原创 2017-09-11 12:24:40 · 332 阅读 · 0 评论