
Trie
文章平均质量分 82
jmspan
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 208. Implement Trie (Prefix Tree)(前缀树)
原题网址:https://leetcode.com/problems/implement-trie-prefix-tree/ Implement a trie with insert, search, and startsWith methods. Note: You may assume that all inputs are consist of lowercase le原创 2016-05-04 10:11:14 · 386 阅读 · 0 评论 -
LeetCode 211. Add and Search Word - Data structure design(单词检索)
原题网址:https://leetcode.com/problems/add-and-search-word-data-structure-design/ Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(原创 2016-05-05 01:43:09 · 1300 阅读 · 0 评论 -
LeetCode 14. Longest Common Prefix(最长公共前缀)
原题网址:https://leetcode.com/problems/longest-common-prefix/ Write a function to find the longest common prefix string amongst an array of strings. 方法一:暴力求解。 public class Solution { public Strin原创 2016-05-19 05:51:55 · 729 阅读 · 0 评论 -
LeetCode 140. Word Break II(单词切分)
原题网址:https://leetcode.com/problems/word-break-ii/ 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 al原创 2016-05-27 00:22:25 · 2938 阅读 · 0 评论 -
LeetCode 336. Palindrome Pairs(回文对)
原题网址:https://leetcode.com/problems/palindrome-pairs/ Given a list of unique words. Find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e.原创 2016-04-30 05:34:08 · 2769 阅读 · 3 评论 -
HackRank Two Two
原题网址:https://www.hackerrank.com/challenges/two-two Prof. Twotwo as the name suggests is very fond powers of 2. Moreover he also has special affinity to number 800. He is known for carrying quirky e原创 2016-07-11 04:36:29 · 1104 阅读 · 0 评论 -
LeetCode 212. Word Search II(单词搜索)
原题网址:https://leetcode.com/problems/word-search-ii/ Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequenti原创 2016-05-05 03:14:10 · 2282 阅读 · 0 评论