摘要:
Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers b... 阅读全文
posted @ 2014-12-21 21:21
陆草纯
阅读(272)
评论(0)
推荐(0)
摘要:
Regular Expression MatchingImplement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more o... 阅读全文
posted @ 2014-12-21 15:22
陆草纯
阅读(6145)
评论(0)
推荐(2)
摘要:
Container With Most WaterGivennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such t... 阅读全文
posted @ 2014-12-21 14:59
陆草纯
阅读(216)
评论(0)
推荐(0)
摘要:
Integer to RomanGiven an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.逐区间做处理。解法一:非递归class Solution... 阅读全文
posted @ 2014-12-21 13:21
陆草纯
阅读(300)
评论(0)
推荐(0)
摘要:
Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.解法一:非递归从左到右遍历每个字符,并记录上个字符来处理... 阅读全文
posted @ 2014-12-21 12:57
陆草纯
阅读(327)
评论(0)
推荐(0)
摘要:
3Sum ClosestGiven an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three int... 阅读全文
posted @ 2014-12-21 12:16
陆草纯
阅读(204)
评论(0)
推荐(0)
摘要:
4SumGiven an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum... 阅读全文
posted @ 2014-12-21 11:11
陆草纯
阅读(518)
评论(0)
推荐(0)