A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded messag ...
分类:
其他好文 时间:
2016-07-12 06:46:53
阅读次数:
137
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac ...
分类:
其他好文 时间:
2016-07-10 09:49:04
阅读次数:
142
He's Circles He's Circles He wrote n letters "X" and "E" in a circle. He thought that there were 2n possibilities to do it, because each letter may be ...
分类:
其他好文 时间:
2016-07-09 17:50:39
阅读次数:
416
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac ...
分类:
编程语言 时间:
2016-07-07 18:58:32
阅读次数:
170
Compare two strings A and B, determine whether A contains all of the characters in B. The characters in string A and B are all Upper Case letters. Not ...
分类:
其他好文 时间:
2016-07-06 13:18:17
阅读次数:
95
结论是..把A串中的字符挪到B串里最近的出现这个字符的地方就能最优了。。。 求出A串中的每个位置上的字符,之后要挪到哪个位置。然后求一波逆序对就是答案了。 1 #include<cstdio> 2 #include<iostream> 3 #include<cstring> 4 #include<a ...
分类:
其他好文 时间:
2016-07-05 20:42:28
阅读次数:
134
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 sequentially adja ...
分类:
其他好文 时间:
2016-07-05 15:38:18
阅读次数:
175
Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac ...
分类:
其他好文 时间:
2016-07-04 21:58:05
阅读次数:
155
Implement a trie with insert, search, and startsWith methods. Note: You may assume that all inputs are consist of lowercase letters a-z. 终于进军trie树,tri ...
分类:
其他好文 时间:
2016-07-04 11:45:09
阅读次数:
177
A message containing letters from A-Z is being encoded to numbers using the following mapping: Given an encoded message containing digits, determine t ...
分类:
编程语言 时间:
2016-06-30 12:46:47
阅读次数:
162