2015年5月13日

17. Letter Combinations of a Phone Number

摘要: Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon... 阅读全文

posted @ 2015-05-13 05:06 shini 阅读(104) 评论(0) 推荐(0) 编辑

2015年5月12日

209. Minimum Size Subarray Sum

摘要: Given an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, return 0 i... 阅读全文

posted @ 2015-05-12 05:38 shini 阅读(144) 评论(0) 推荐(0) 编辑

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) 编辑

2015年4月29日

2. Add Two Numbers

摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文

posted @ 2015-04-29 11:26 shini 阅读(93) 评论(0) 推荐(0) 编辑

205. Isomorphic Strings

摘要: Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of a ... 阅读全文

posted @ 2015-04-29 11:14 shini 阅读(108) 评论(0) 推荐(0) 编辑

导航