https://oj.leetcode.com/problems/word-break/http://blog.csdn.net/linhuanmars/article/details/22358863publicclassSolution{
publicbooleanwordBreak(Strings,Set<String>dict)
{
s="#"+s;//Addadummychar
intlen=s.length();
boolean[]poss=newboolean[len];
poss..
分类:
其他好文 时间:
2015-01-08 18:15:49
阅读次数:
104
https://oj.leetcode.com/problems/palindrome-partitioning/http://blog.csdn.net/linhuanmars/article/details/22777711publicclassSolution{
publicList<List<String>>partition(Strings){
//NP
List<List<String>>result=newArrayList<>()..
分类:
其他好文 时间:
2015-01-08 15:30:19
阅读次数:
111
All 2D Game Engines/Frameworks are trying to solve the same problems. Thus, the languages don't matter; they are simply the technologies, the bricks t...
分类:
其他好文 时间:
2015-01-08 07:03:50
阅读次数:
171
The problem:Convert Sorted List to Binary Search TreeLink:https://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/My analysis:The i...
分类:
其他好文 时间:
2015-01-08 02:02:08
阅读次数:
179
https://oj.leetcode.com/problems/valid-palindrome/http://blog.csdn.net/linhuanmars/article/details/22775045publicclassSolution{
publicbooleanisPalindrome(Strings){
{
if(s==null)
returnfalse;
if(s.isEmpty())
returntrue;
char[]chars=s.toLowerCase().toCharAr..
分类:
其他好文 时间:
2015-01-07 19:15:41
阅读次数:
149
https://oj.leetcode.com/problems/binary-tree-maximum-path-sum/http://blog.csdn.net/linhuanmars/article/details/22969069/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publicclassSoluti..
分类:
其他好文 时间:
2015-01-07 19:14:02
阅读次数:
158
https://oj.leetcode.com/problems/word-ladder/http://blog.csdn.net/linhuanmars/article/category/1918893/2publicclassSolution{
publicintladderLength(Stringstart,Stringend,Set<String>dict)
{
//Putendintodict
Set<String>dictionary=newHashSet<>..
分类:
其他好文 时间:
2015-01-07 19:08:18
阅读次数:
91
https://oj.leetcode.com/problems/word-ladder-ii/http://blog.csdn.net/linhuanmars/article/details/23071455publicclassSolution{
publicList<List<String>>findLadders(Stringstart,Stringend,Set<String>dict)
{
List<List<String>>toRetu..
分类:
其他好文 时间:
2015-01-07 19:05:33
阅读次数:
201
https://oj.leetcode.com/problems/longest-consecutive-sequence/http://blog.csdn.net/linhuanmars/article/details/22964467publicclassSolution{
publicintlongestConsecutive(int[]num){
//SolutionA:
//returnlongestConsecutive_Sort(num);
//SolutionB:
returnlonges..
分类:
其他好文 时间:
2015-01-07 19:03:11
阅读次数:
165
https://oj.leetcode.com/problems/sum-root-to-leaf-numbers/http://blog.csdn.net/linhuanmars/article/details/22913699/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publicclassSolution{
..
分类:
其他好文 时间:
2015-01-07 19:01:24
阅读次数:
112