- 博客(9)
- 收藏
- 关注
原创 LeetCode #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 endpoints of line i is at (i, ai) and (i, 0). Find two...
2019-05-16 21:56:47
181
原创 LeetCode #9. Palindrome Number
Determine whether an integer is a palindrome. An integerisapalindrome when itreads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 Output: false Expl...
2019-05-15 18:47:38
283
原创 LeetCode #8. String to Integer (atoi)
Implementatoiwhichconverts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from thi...
2019-05-15 18:13:46
142
原创 LeetCode #7. 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 are dea...
2019-05-07 18:56:45
191
原创 LeetCode #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 for better legibility) P A H N A P L S I I...
2019-05-06 11:28:18
174
原创 LeetCode #5. 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 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer. Exa...
2019-04-30 12:32:49
162
原创 LeetCode #3. Longest Substring Without Repeating Characters
Given a string, find the length of thelongest substringwithout repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2: ...
2019-04-29 23:33:24
118
原创 LeetCode #2. Add Two Numbers
You are given twonon-emptylinked lists representing two non-negative integers. The digits are stored inreverse orderand each of their nodes contain a single digit. Add the two numbers and return i...
2019-04-28 11:59:53
135
原创 LeetCode #1. Two Sum
LeetCode #1 1.Two Sum Given an array of integers, returnindicesof the two numbers such that they add up to a specific target. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0]...
2019-04-27 22:41:55
175
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅