码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
[LeetCode]108 Convert Sorted Array to Binary Search Tree
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
[LeetCode]1 Two Sum
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
[LeetCode]109 Convert Sorted List to Binary Search Tree
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
[LeetCode]46 Permutations
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
[LeetCode]2 Add Two Numbers
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
[LeetCode]3 Longest Substring Without Repeating Characters
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
[LeetCode]5 Longest Palindromic Substring
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
[LeetCode]8 String to Integer (atoi)
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
[LeetCode]9 Palindrome Number
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
[LeetCode]6 ZigZag Conversion
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!