![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
西瓜君的父亲
这个作者很懒,什么都没留下…
展开
-
LeetCode #1. Two Sum
LeetCode #11.Two SumGiven 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 · 128 阅读 · 2 评论 -
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 · 93 阅读 · 0 评论 -
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 · 76 阅读 · 0 评论 -
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 · 90 阅读 · 0 评论 -
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 NA P L S I I...原创 2019-05-06 11:28:18 · 115 阅读 · 0 评论 -
LeetCode #7. Reverse Integer
Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dea...原创 2019-05-07 18:56:45 · 134 阅读 · 0 评论 -
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 · 91 阅读 · 0 评论 -
LeetCode #9. Palindrome Number
Determine whether an integer is a palindrome. An integerisapalindrome when itreads the same backward as forward.Example 1:Input: 121Output: trueExample 2:Input: -121Output: falseExpl...原创 2019-05-15 18:47:38 · 226 阅读 · 0 评论 -
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 · 126 阅读 · 0 评论