
LeetCode
泳冠三军
这个作者很懒,什么都没留下…
展开
-
LeetCode第一题(Two Sum)
Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may n...原创 2018-03-31 17:14:26 · 180 阅读 · 0 评论 -
LeetCode第九题(Palindrome Number)
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 ...原创 2018-04-10 01:25:23 · 172 阅读 · 0 评论 -
LeetCode第八题(String to Integer (atoi))
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 w...原创 2018-04-10 01:10:57 · 174 阅读 · 0 评论 -
LeetCode第七题(Reverse Integer)
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: 21 Note...原创 2018-04-10 00:04:19 · 207 阅读 · 0 评论 -
LeetCode第六题(ZigZag Conversion)
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 ...原创 2018-04-09 01:24:45 · 173 阅读 · 0 评论 -
LeetCode第371题(Sum of Two Integers)
Sum of Two Integers Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example:Given a = 1 and b = 2, return 3.Credits:Special thanks to @f...原创 2018-03-31 23:08:26 · 169 阅读 · 0 评论 -
LeetCode第四题(Median of Two Sorted Arrays)
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 (...原创 2018-03-31 17:24:33 · 169 阅读 · 0 评论 -
LeetCode第三题(Longest Substring Without Repeating Characters)
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 ...原创 2018-03-31 17:22:38 · 140 阅读 · 0 评论 -
LeetCode第二题(Add Two Numbers)
Add Two Numbers You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two ...原创 2018-03-31 17:21:31 · 140 阅读 · 0 评论 -
LeetCode第五题(Longest Palindromic Substring)
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.Example1:Input: "babad"Output: "bab"Note: ...原创 2018-04-03 22:34:19 · 597 阅读 · 1 评论