上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 43 下一页

2016年4月13日

13. Roman to Integer

摘要: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 阅读全文

posted @ 2016-04-13 18:54 joannae 阅读(153) 评论(0) 推荐(0) 编辑

2016年4月8日

12. Integer to Roman

摘要: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 阅读全文

posted @ 2016-04-08 22:55 joannae 阅读(160) 评论(0) 推荐(0) 编辑

11. Container With Most Water(头尾双指针)

摘要: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文

posted @ 2016-04-08 15:29 joannae 阅读(202) 评论(0) 推荐(0) 编辑

10. Regular Expression Matching

摘要: Implement regular expression matching with support for '.' and '*'. 思路:在出现*的时候,因为可能出现0,1,2,...次,所以要使用到带回溯的递归 阅读全文

posted @ 2016-04-08 06:34 joannae 阅读(116) 评论(0) 推荐(0) 编辑

2016年4月7日

9. Palindrome Number (考虑负数的情况)

摘要: Determine whether an integer is a palindrome. Do this without extra space. 阅读全文

posted @ 2016-04-07 18:22 joannae 阅读(118) 评论(0) 推荐(0) 编辑

8. String to Integer (整数的溢出)

摘要: Implement atoi to convert a string to an integer. If no valid conversion could be performed, a zero value is returned. If the correct value is out of 阅读全文

posted @ 2016-04-07 18:15 joannae 阅读(197) 评论(0) 推荐(0) 编辑

7. Reverse Integer (整数的溢出)

摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 For the purpose of this problem, assume that your function 阅读全文

posted @ 2016-04-07 09:12 joannae 阅读(170) 评论(0) 推荐(0) 编辑

6. ZigZag Conversion (字符串的连接)

摘要: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文

posted @ 2016-04-07 07:14 joannae 阅读(154) 评论(0) 推荐(0) 编辑

2016年4月6日

5. Longest Palindromic Substring (DP)

摘要: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes 阅读全文

posted @ 2016-04-06 15:43 joannae 阅读(157) 评论(0) 推荐(0) 编辑

4. Median of Two Sorted Arrays (二分法;递归的结束条件)

摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文

posted @ 2016-04-06 06:32 joannae 阅读(289) 评论(0) 推荐(0) 编辑

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 43 下一页

导航