2015年4月30日

11. Container With Most Water

摘要: Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ... 阅读全文

posted @ 2015-04-30 06:58 shini 阅读(111) 评论(0) 推荐(0) 编辑

8. String to Integer (atoi)

摘要: Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ... 阅读全文

posted @ 2015-04-30 06:45 shini 阅读(100) 评论(0) 推荐(0) 编辑

9. Palindrome Number

摘要: Determine whether an integer is a palindrome. Do this without extra space.类似于reverse integer。public class Solution { public boolean isPalindrome(... 阅读全文

posted @ 2015-04-30 06:21 shini 阅读(102) 评论(0) 推荐(0) 编辑

7. Reverse Integer

摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321注意溢出,溢出返回0public class Solution { public int reverse(int x... 阅读全文

posted @ 2015-04-30 06:18 shini 阅读(124) 评论(0) 推荐(0) 编辑

5. Longest Palindromic Substring

摘要: Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa... 阅读全文

posted @ 2015-04-30 02:39 shini 阅读(78) 评论(0) 推荐(0) 编辑

128. Longest Consecutive Sequence

摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ... 阅读全文

posted @ 2015-04-30 00:36 shini 阅读(98) 评论(0) 推荐(0) 编辑

导航