LeetCode
文章平均质量分 70
进步小二郎
学无止境
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode6. 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 for better legibility) And then read li...原创 2018-03-14 21:39:34 · 172 阅读 · 0 评论 -
LeetCode7. Reverse Integer
一、问题描述 Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 Note: Assume we ...原创 2018-03-15 17:55:45 · 342 阅读 · 0 评论 -
LeetCode8. String to Integer (atoi)
一、题目描述 Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible in...原创 2018-03-16 12:41:48 · 212 阅读 · 0 评论 -
LeetCode9. Palindrome Number
一、题目描述 Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to stri...原创 2018-03-16 15:21:35 · 217 阅读 · 0 评论 -
LeetCode3. Longest Substring Without Repeating Characters
一、题目说明: Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcbb”, the answer is “abc”, which the length is 3. Given “bbbbb”, the answer is ...原创 2018-03-11 12:45:13 · 166 阅读 · 0 评论 -
LeetCode4. 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 should be O(log (m+n)). Example 1: nums1 ...原创 2018-03-11 19:57:56 · 195 阅读 · 0 评论 -
LeetCode5. Longest Palindromic Substring(马拉车算法 Manacher Algorithm)
一、问题描述 Given a string s, find the longest palindromic substring *(最长回文字符串)*in s. You may assume that the maximum length of s is 1000. Example: Input: “babad” Output: “bab” Note: “aba” is also a v...原创 2018-03-13 11:26:26 · 858 阅读 · 1 评论 -
LeetCode5. Longest Palindromic Substring(动态规划)
一、问题描述 Given a string s, find the longest palindromic substring(最长回文字符串) in s. You may assume that the maximum length of s is 1000. Example: Input: “babad” Output: “bab” Note: “aba” is also a val...原创 2018-03-13 17:59:03 · 933 阅读 · 0 评论 -
LeetCode5. Longest Palindromic Substring(中心扩散法)
一、问题描述 Given a string s, find the longest palindromic substring(最长回文字符串) in s. You may assume that the maximum length of s is 1000. Example: Input: “babad” Output: “bab” Note: “aba” is also a val...原创 2018-03-14 10:39:19 · 833 阅读 · 1 评论
分享