上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 27 下一页
摘要: String to Integer (atoi)Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, plea... 阅读全文
posted @ 2014-12-22 11:30 陆草纯 阅读(280) 评论(0) 推荐(0) 编辑
摘要: Majority ElementGiven an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may ass... 阅读全文
posted @ 2014-12-22 10:38 陆草纯 阅读(9668) 评论(6) 推荐(1) 编辑
摘要: 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 陆草纯 阅读(266) 评论(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 陆草纯 阅读(6138) 评论(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 陆草纯 阅读(211) 评论(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 陆草纯 阅读(291) 评论(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 陆草纯 阅读(318) 评论(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 陆草纯 阅读(196) 评论(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 陆草纯 阅读(511) 评论(0) 推荐(0) 编辑
摘要: Excel Sheet Column TitleGiven a non-zero positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A ... 阅读全文
posted @ 2014-12-20 21:06 陆草纯 阅读(8479) 评论(6) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 27 下一页