码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
[LeetCode][Python]Median of Two Sorted Arrays
# -*- coding: utf8 -*-'''https://oj.leetcode.com/problems/median-of-two-sorted-arrays/There are two sorted arrays A and B of size m and n respectively...
分类:编程语言   时间:2015-01-12 01:34:26    阅读次数:214
[LeetCode][Python]Add Two Numbers
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'https://oj.leetcode.com/problems/add-two-numbers/You are given two linked lists representi...
分类:编程语言   时间:2015-01-12 01:33:51    阅读次数:239
[LeetCode][Python]Tow Sum
# -*- coding: utf8 -*-'''https://oj.leetcode.com/problems/two-sum/Given an array of integers, find two numbers such that they add up to a specific tar...
分类:编程语言   时间:2015-01-12 00:23:44    阅读次数:391
[LeetCode] Climbing Stairs (Sequence DP)
Climbing Stairs https://oj.leetcode.com/problems/climbing-stairs/ You are climbing a stair case. It takes n steps to reach to the top. Each time you c...
分类:其他好文   时间:2015-01-11 22:56:12    阅读次数:225
[LeetCode] Unique Paths && Unique Paths II && Minimum Path Sum (动态规划之 Matrix DP )
Unique Paths https://oj.leetcode.com/problems/unique-paths/ A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram b...
分类:其他好文   时间:2015-01-11 21:30:24    阅读次数:319
[LeetCode]155 Min Stack
https://oj.leetcode.com/problems/min-stack/http://blog.csdn.net/linhuanmars/article/details/41008731classMinStack{ publicvoidpush(intx){ data.push(x); if(min.empty()||(x<=(int)min.peek())) { min.push(x); } } publicvoidpop(){ if(data.empty()) return; in..
分类:其他好文   时间:2015-01-09 19:35:38    阅读次数:146
[LeetCode]153 Find Minimum in Rotated Sorted Array
https://oj.leetcode.com/problems/find-minimum-in-rotated-sorted-array/http://blog.csdn.net/linhuanmars/article/details/40449295publicclassSolution{ publicintfindMin(int[]num){ //Assumenumisnotnull. returnfind(num,0,num.length-1); } privateintfind(int[]n,in..
分类:其他好文   时间:2015-01-09 19:35:03    阅读次数:179
[LeetCode]154 Find Minimum in Rotated Sorted Array II
https://oj.leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/http://blog.csdn.net/linhuanmars/article/details/40449299publicclassSolution{ publicintfindMin(int[]num){ //SolutionA: //returnfindMin_Iteration(num); //SolutionB: returnfindMin_Recu..
分类:其他好文   时间:2015-01-09 19:34:31    阅读次数:165
[LeetCode]165 Compare Version Numbers
https://oj.leetcode.com/problems/compare-version-numbers/http://blog.csdn.net/u012243115/article/details/41969181publicclassSolution{ publicintcompareVersion(Stringversion1,Stringversion2){ if(version1==null||version2==null) return0;//Invalidinput. //NOTE!..
分类:其他好文   时间:2015-01-09 19:31:02    阅读次数:164
[LeetCode]168 Excel Sheet Column Title
https://oj.leetcode.com/problems/excel-sheet-column-title/http://blog.csdn.net/miss_snow_m/article/details/42098357publicclassSolution{ publicStringconvertToTitle(intn){ if(n<=0) returnnull; StringBuildersb=newStringBuilder(); do { intd=n%26; sb.append..
分类:其他好文   时间:2015-01-09 19:30:41    阅读次数:152
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!