码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
[LeetCode]28 Implement strStr()
https://oj.leetcode.com/problems/implement-strstr/http://fisherlei.blogspot.com/2012/12/leetcode-implement-strstr.htmlpublicclassSolution{ publicintstrStr(Stringhaystack,Stringneedle){ //遍历haystack,对每一个字符,匹配needle if(haystack==null||needle==nu..
分类:其他好文   时间:2015-01-02 16:12:25    阅读次数:149
[LeetCode]24 Swap Nodes in Pairs
https://oj.leetcode.com/problems/swap-nodes-in-pairs/http://fisherlei.blogspot.com/2013/01/leetcode-swap-nodes-in-pairs.html/** *Definitionforsingly-linkedlist. *publicclassListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publ..
分类:其他好文   时间:2015-01-02 16:12:21    阅读次数:151
[LeetCode]26 Remove Duplicates from Sorted Array
https://oj.leetcode.com/problems/remove-duplicates-from-sorted-array/http://fisherlei.blogspot.com/2012/12/leetcode-remove-duplicates-from-sorted.htmlpublicclassSolution{ publicintremoveDuplicates(int[]A){ if(A==null||A.length==0) return0;//Invalidinput. ..
分类:其他好文   时间:2015-01-02 16:12:07    阅读次数:118
[LeetCode]25 Reverse Nodes in k-Group
https://oj.leetcode.com/problems/reverse-nodes-in-k-group/http://fisherlei.blogspot.com/2012/12/leetcode-reverse-nodes-in-k-group.html/** *Definitionforsingly-linkedlist. *publicclassListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} ..
分类:其他好文   时间:2015-01-02 16:12:00    阅读次数:238
[LeetCode]23 Merge k Sorted Lists
https://oj.leetcode.com/problems/merge-k-sorted-lists/http://fisherlei.blogspot.com/2012/12/leetcode-merge-k-sorted-lists.html/** *Definitionforsingly-linkedlist. *publicclassListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ pu..
分类:其他好文   时间:2015-01-02 16:11:43    阅读次数:152
[LeetCode]31 Next Permutation
https://oj.leetcode.com/problems/next-permutation/http://fisherlei.blogspot.com/2012/12/leetcode-next-permutation.htmlpublicclassSolution{ publicvoidnextPermutation(int[]num){ //SolutionB nextPermutation_Math(num); //SolutionA //nextPermutation_AllPerms(..
分类:其他好文   时间:2015-01-02 16:11:11    阅读次数:93
[LeetCode]27 Remove Element
https://oj.leetcode.com/problems/remove-element/http://fisherlei.blogspot.com/2012/12/leetcode-remove-element.htmlpublicclassSolution{ publicintremoveElement(int[]A,intelem){ //Theordercanbechanged. //Use2pointers. //Onetoiteratethearray, //Onetocopythelas..
分类:其他好文   时间:2015-01-02 16:10:11    阅读次数:129
[LeetCode]42 Trapping Rain Water
https://oj.leetcode.com/problems/trapping-rain-water/http://fisherlei.blogspot.com/2013/01/leetcode-trapping-rain-water.htmlpublicclassSolution{ publicinttrap(int[]A){ //对于某坐标有 //-leftmax它左边最高 //-rightmax它右边最高 //-val它本身高度 //那么它的容..
分类:移动开发   时间:2015-01-02 07:34:08    阅读次数:195
[LeetCode]145 Binary Tree Postorder Traversal
https://oj.leetcode.com/problems/binary-tree-postorder-traversal/http://blog.csdn.net/ljphhj/article/details/21369053/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSolution..
分类:其他好文   时间:2015-01-02 07:33:36    阅读次数:132
[LeetCode]113 Binary Tree Postorder Traversal
https://oj.leetcode.com/problems/path-sum-ii/http://fisherlei.blogspot.com/search?q=Path+Sum+II+/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSolution{ publicList<List&..
分类:其他好文   时间:2015-01-02 07:33:25    阅读次数:151
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!