https://oj.leetcode.com/problems/convert-sorted-array-to-binary-search-tree/http://fisherlei.blogspot.com/2013/03/leetcode-convert-sorted-array-to-binary.html/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNod..
分类:
其他好文 时间:
2015-01-02 16:19:16
阅读次数:
151
https://oj.leetcode.com/problems/two-sum/http://fisherlei.blogspot.com/2013/03/leetcode-two-sum-solution.htmlpublicclassSolution{
publicint[]twoSum(int[]numbers,inttarget){
//SolutionA
//returntwoSum_SortAndTwoPointer(numbers,target);
//SolutionB
returntw..
分类:
其他好文 时间:
2015-01-02 16:17:51
阅读次数:
144
https://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/http://fisherlei.blogspot.com/2013/01/leetcode-convert-sorted-list-to-binary.htmlhttp://blog.csdn.net/worldwindjp/article/details/39722643/**
*Definitionforsingly-linkedlist.
*public..
分类:
其他好文 时间:
2015-01-02 16:17:43
阅读次数:
215
https://oj.leetcode.com/problems/permutations/http://fisherlei.blogspot.com/2012/12/leetcode-permutations.htmlTODOseesubsetcombination,nextpublicclassSolution{
//Assumesallinputnumbersareunique
publicList<List<Integer>>permute(int[]num){
retur..
分类:
其他好文 时间:
2015-01-02 16:17:16
阅读次数:
126
https://oj.leetcode.com/problems/add-two-numbers/http://fisherlei.blogspot.com/2013/01/leetcode-add-two-numbers-solution.html/**
*Definitionforsingly-linkedlist.
*publicclassListNode{
*intval;
*ListNodenext;
*ListNode(intx){
*val=x;
*next=null;
*}
*}
*/
pub..
分类:
其他好文 时间:
2015-01-02 16:16:51
阅读次数:
132
https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/http://fisherlei.blogspot.com/2012/12/leetcode-longest-substring-without.htmlpublicclassSolution{
publicintlengthOfLongestSubstring(Strings){
if(s==null||s.isEmpty())
return0;/..
分类:
其他好文 时间:
2015-01-02 16:16:01
阅读次数:
119
https://oj.leetcode.com/problems/longest-palindromic-substring/http://fisherlei.blogspot.com/2012/12/leetcode-longest-palindromic-substring.htmlpublicclassSolution{
publicStringlongestPalindrome(Strings){
//SolutionA:
returnlongestPalindrome_Center(s);
}
..
分类:
其他好文 时间:
2015-01-02 16:15:08
阅读次数:
122
https://oj.leetcode.com/problems/string-to-integer-atoi/http://fisherlei.blogspot.com/2013/01/leetcode-string-to-integer-atoi.htmlpublicclassSolution{
publicintatoi(Stringstr){
//Validations
if(str==null||str.length()==0)
return0;
char[]chars=str.trim()...
分类:
其他好文 时间:
2015-01-02 16:14:54
阅读次数:
157
https://oj.leetcode.com/problems/palindrome-number/http://fisherlei.blogspot.com/2012/12/leetcode-palindrome-number.htmlpublicclassSolution{
publicbooleanisPalindrome(intx){
//Assume
//Negativenumberscannotbepalindrome
if(x<0)
returnfalse;
//Noextrasp..
分类:
其他好文 时间:
2015-01-02 16:14:01
阅读次数:
116
https://oj.leetcode.com/problems/zigzag-conversion/http://fisherlei.blogspot.com/2013/01/leetcode-zigzag-conversion.htmlpublicclassSolution{
publicStringconvert(Strings,intnRows){
//SolutionA:
returnconvert_NoNewMatrix(s,nRows);
}
////////////////////////..
分类:
其他好文 时间:
2015-01-02 16:13:47
阅读次数:
140