摘要: Add and Search Word - Data structure design (M) 题目 Design a data structure that supports the following two operations: void addWord(word) bool search( 阅读全文
posted @ 2020-08-06 14:23 墨云黑 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Implement Trie (Prefix Tree) (M) 题目 Implement a trie with insert, search, and startsWith methods. Example: Trie trie = new Trie(); trie.insert("apple" 阅读全文
posted @ 2020-08-06 13:58 墨云黑 阅读(135) 评论(0) 推荐(0) 编辑