
leetcode
文章平均质量分 82
记录leetcode的刷题经历
yoyooyooo
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
#21 Merge Two Sorted Lists
Description Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Examples Input: 1->2->4, 1->3->4 ...原创 2019-01-29 13:22:03 · 156 阅读 · 0 评论 -
#20 Valid Parentheses
Description Given a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same...原创 2019-01-29 12:57:44 · 112 阅读 · 0 评论 -
#19 Remove Nth Node From End of List
Description Given a linked list, remove the n-th node from the end of list and return its head. Example Given linked list: 1->2->3->4->5, and n = 2. Output: 1->2->3->5. 解题思路 最常见...原创 2019-01-24 22:11:20 · 168 阅读 · 0 评论 -
#18 4Sum
Description Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + d = target? Find all unique quadruplets in the array which gives th...原创 2019-01-24 21:22:07 · 165 阅读 · 0 评论 -
#17 Letter Combinations of a Phone Number
Description Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone butt...原创 2019-01-23 23:24:35 · 219 阅读 · 0 评论 -
#16 3Sum Closest
Description Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that each ...原创 2019-01-23 22:23:42 · 122 阅读 · 0 评论 -
#15 3Sum
Description Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set mus...原创 2019-01-22 23:59:05 · 126 阅读 · 0 评论 -
#14 Longest Common Prefix
Description Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “” Examples Example 1: Input: [“flower”,“flow”,...原创 2019-01-21 23:46:30 · 113 阅读 · 0 评论 -
#13 Roman to Integer
Description Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I  原创 2019-01-21 19:17:25 · 119 阅读 · 0 评论 -
#12 Integer to Roman
Description Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I  原创 2019-01-21 10:33:58 · 158 阅读 · 0 评论 -
#11 Container With Most Water
Description 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)...原创 2019-01-20 23:57:22 · 124 阅读 · 0 评论 -
#9 Palindrome Number
Description Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Examples Example 1: Input: 121 Output: true Example 2: Input: -121 O...原创 2018-12-06 22:41:16 · 126 阅读 · 0 评论 -
#8 String to Integer (atoi)
Description Implement 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, starti...原创 2018-12-06 21:24:47 · 122 阅读 · 0 评论 -
#2 Add Two Numbers
Description 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 numbers ...原创 2018-12-01 01:07:36 · 143 阅读 · 0 评论 -
#3 Longest Substring without Repeating Characters
Description Given a string, find the length of the longest substring without repeating characters. Examples Example1: Input: “abcabcbb” Output: 3 Explanation: The answer is “abc”, with the length of ...原创 2018-12-02 01:14:48 · 238 阅读 · 1 评论 -
#4 Median of Two Sorted Arrays
Description 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)). You may assume n...原创 2018-12-03 01:04:17 · 132 阅读 · 0 评论 -
#5 Longest Palindromic Substring
Description Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Examples Example1 Input: “babad” Output: “bab” Note: “aba” is also a va...原创 2018-12-04 00:16:01 · 112 阅读 · 0 评论 -
#6 ZigZag Conversion
Description 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 ...原创 2018-12-04 21:41:03 · 251 阅读 · 0 评论 -
#7 Reverse Integer
Description Given a 32-bit signed integer, reverse digits of an integer. Note: Assume we are dealing with an environment which could only store integers within the 32-bit signed integer range: [−231, ...原创 2018-12-05 22:50:55 · 143 阅读 · 0 评论 -
#1 Two-sum
Description 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 not us...原创 2018-11-30 01:17:44 · 174 阅读 · 0 评论