![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
文章平均质量分 56
CodeAsWind
不积跬步,无疑至千里
展开
-
Generate Parentheses
Generate ParenthesesGiven n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is: "((()))", "(()())",原创 2014-07-22 21:26:47 · 388 阅读 · 0 评论 -
Integer to Roman
Integer to Roman原创 2014-07-23 23:24:22 · 375 阅读 · 0 评论 -
Palindrome Number
Palindrome Number原创 2014-07-24 14:12:09 · 390 阅读 · 0 评论 -
Longest Palindromic Substring
Longest Palindromic SubstringGiven a string S, find the longest palindromic substring in S. You may assume that the maximum length ofS is 1000, and there exists one unique longest palindromic翻译 2014-07-24 16:08:17 · 496 阅读 · 0 评论 -
Longest Substring Without Repeating Characters
Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters翻译 2014-07-24 17:02:27 · 383 阅读 · 0 评论 -
ZigZag Conversion
ZigZag ConversionThe 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翻译 2014-07-24 15:28:11 · 294 阅读 · 0 评论 -
Search in Rotated Sorted Array
Search in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become4 5 6 7 0 1 2).You are given a target value to sear原创 2014-08-25 15:38:42 · 312 阅读 · 0 评论 -
Remove Duplicates from Sorted Array II
Remove Duplicates from Sorted Array IIFollow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array A = [1,1,1,2,2,3],Your function shou原创 2014-08-25 15:16:52 · 481 阅读 · 0 评论 -
Search in Rotated Sorted Array II
Search in Rotated Sorted Array II原创 2014-08-25 17:13:59 · 412 阅读 · 0 评论 -
Median of Two Sorted Arrays
Median of Two Sorted ArraysThere are two sorted arrays A and B 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)).原创 2014-08-25 17:57:43 · 513 阅读 · 0 评论 -
Permutation Sequence
Permutation SequenceThe set [1,2,3,…,n] contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):原创 2014-08-26 17:16:59 · 412 阅读 · 0 评论 -
Two Sum
Two Sum Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the tar原创 2014-08-26 16:33:25 · 397 阅读 · 0 评论 -
Remove Duplicates from Sorted Array
Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear onlyonce and return the new length.Do not allocate extra space for another a原创 2014-08-25 14:48:10 · 382 阅读 · 0 评论 -
Longest Consecutive Sequence
Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest conse原创 2014-08-25 18:23:10 · 338 阅读 · 0 评论 -
Remove Element
Remove ElementGiven an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond原创 2014-08-26 16:51:59 · 413 阅读 · 0 评论 -
Next Permutation
Next PermutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it原创 2014-08-26 17:05:37 · 392 阅读 · 0 评论 -
Valid Sudoku
Valid Sudoku原创 2014-09-02 17:50:35 · 443 阅读 · 0 评论 -
Roman to Integer
Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.原创 2014-07-23 22:09:16 · 370 阅读 · 0 评论 -
Reverse Integer
Reverse IntegerReverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321原创 2014-07-24 14:58:58 · 428 阅读 · 0 评论 -
Valid Parentheses
Valid ParenthesesGiven a string containing just the characters '(', ')','{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "原创 2014-07-22 21:37:14 · 299 阅读 · 0 评论 -
3Sum
3SumGiven an array S of n integers, are there elements a,b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.原创 2014-07-23 11:06:29 · 414 阅读 · 0 评论 -
Remove Element
Remove Element原创 2014-07-22 11:52:13 · 390 阅读 · 0 评论 -
Implement strStr()
Implement strStr()原创 2014-07-22 14:20:10 · 336 阅读 · 0 评论 -
Letter Combinations of a Phone Number
Letter Combinations of a Phone NumberGiven a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone butto原创 2014-07-22 22:54:30 · 285 阅读 · 0 评论 -
Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array原创 2014-07-22 12:31:27 · 371 阅读 · 0 评论 -
Swap Nodes in Pairs
Swap Nodes in Pairs原创 2014-07-22 15:17:12 · 423 阅读 · 0 评论 -
3Sum Closest
3Sum ClosestGiven an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input原创 2014-07-23 11:33:13 · 315 阅读 · 0 评论 -
Merge k Sorted Lists
Merge k Sorted Lists原创 2014-07-22 20:43:46 · 434 阅读 · 0 评论 -
4Sum
Given an array S of n integers, are there elements a,b, c, and d in S such that a + b +c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note:Elements原创 2014-07-23 12:02:35 · 455 阅读 · 0 评论 -
Reverse Nodes in k-Group
Reverse Nodes in k-Group原创 2014-07-22 14:00:02 · 423 阅读 · 0 评论 -
Remove Nth Node From End of List
Remove Nth Node From End of ListGiven a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing原创 2014-07-22 22:27:09 · 456 阅读 · 0 评论 -
Container With Most Water
Container With Most WaterGiven 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 linei原创 2014-07-23 23:42:12 · 402 阅读 · 0 评论 -
Regular Expression Matching
Regular Expression Matching原创 2014-07-24 13:29:44 · 486 阅读 · 0 评论 -
Longest Common Prefix
Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.原创 2014-07-23 21:47:53 · 471 阅读 · 0 评论 -
String to Integer (atoi)
String to Integer (atoi)翻译 2014-07-24 14:38:48 · 518 阅读 · 0 评论 -
Trapping Rain Water
Trapping Rain Water题目大意原创 2014-09-02 18:45:25 · 540 阅读 · 0 评论