# -*- 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
# -*- 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
# -*- 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
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
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
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
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
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
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
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