LeetCode编程
文章平均质量分 63
向上!@#
这个作者很懒,什么都没留下…
展开
-
2. Add Two Numbers
DescriptionYou 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 numbers...原创 2018-04-23 20:33:47 · 102 阅读 · 0 评论 -
3. Longest Substring Without Repeating Characters
DescriptionGiven 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...原创 2018-04-25 15:53:11 · 121 阅读 · 0 评论 -
1. Two Sum
DescriptionGiven 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 not ...原创 2018-04-21 18:21:30 · 89 阅读 · 0 评论 -
4. Median of Two Sorted Arrays
DescriptionThere 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)).Example1: ...原创 2018-04-25 23:11:26 · 104 阅读 · 0 评论 -
7. Reverse Integer
DescriptionGiven a 32-bit signed integer, reverse digits of an integer.Example 1: Input: 123 Output: 321Example 2: Input: -123 Output: -321Example 3: Input: 120 Output: ...原创 2018-05-06 18:11:30 · 180 阅读 · 0 评论 -
5. Longest Palindromic Substring
DescriptionGiven 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 ...原创 2018-04-29 16:08:25 · 128 阅读 · 0 评论 -
6. ZigZag Conversion
DescriptionThe 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 re...原创 2018-04-29 16:43:04 · 158 阅读 · 0 评论 -
8. String to Integer (atoi)
DescriptionImplement atoi which converts a string to an integer.The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, star...原创 2018-05-27 13:05:42 · 161 阅读 · 0 评论