ZS the Coder loves to read the dictionary. He thinks that a word is nice if there exists asubstring (contiguous segment of letters) of it of length 26 ...
分类:
其他好文 时间:
2018-03-07 15:07:44
阅读次数:
166
Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs are consist of lowercase letters a-z. 实现一个数据结构:字典树(前 ...
分类:
其他好文 时间:
2018-03-07 11:44:08
阅读次数:
183
Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho ...
分类:
其他好文 时间:
2018-03-03 10:54:39
阅读次数:
220
Replace A Time limit: 1000 msMemory limit: 256 MB Replace A Time limit: 1000 msMemory limit: 256 MB You are given a string SS containing only letters ...
分类:
其他好文 时间:
2018-03-01 21:52:29
阅读次数:
154
Berland scientists know that the Old Berland language had exactly n words. Those words had lengths of l1,?l2,?...,?ln letters. Every word consisted of ...
分类:
其他好文 时间:
2018-03-01 21:48:24
阅读次数:
191
A message containing letters from A-Z is being encoded to numbers using the following mapping: Given an encoded message containing digits, determine t ...
分类:
其他好文 时间:
2018-02-28 16:26:42
阅读次数:
136
1.题目描述 Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the ...
分类:
其他好文 时间:
2018-02-27 01:22:53
阅读次数:
179
S and T are strings composed of lowercase letters. In S, no letter occurs more than once. S was sorted in some custom order previously. We want to per ...
分类:
其他好文 时间:
2018-02-26 21:51:53
阅读次数:
174
S and T are strings composed of lowercase letters. In S, no letter occurs more than once. S was sorted in some custom order previously. We want to per ...
分类:
其他好文 时间:
2018-02-26 20:41:33
阅读次数:
307
一个连通图的生成树是一个极小的连通子图,它包含图中全部的顶点(n个顶点),但只有n-1条边。 最小生成树:构造连通网的最小代价(最小权值)生成树。 prim算法在严蔚敏树上有解释,但是都是数学语言,很深奥。 最小生成树MST性质:假设N=(V,{E})是一个连通网,U是顶点集V的一个非空子集。若(u ...
分类:
编程语言 时间:
2018-02-24 11:42:41
阅读次数:
160