Leetcode 0022.GenerateParentheses
22. Generate Parentheses题目Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n =...
Leetcode 0021.合并两个有序链表
21. 合并两个有序链表将两个升序链表合并为一个新的 升序 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 示例 1: 示例 2: 示例 3: 题目大意需要将两个升序排列的链表合并成一个新的升序链表,新链表由原两个链表的所有节点组成,且保持升序排列。 解题思路 使用虚拟头节点...
Leetcode 0020. Valid Parentheses
20. Valid ParenthesesGiven a string s containing just the characters '(', ')', '{', '}', '[' and ']'...
Leetcode 0019. Remove Nth Node From End of List
19. Remove Nth Node From End of ListGiven the head of a linked list, remove the nth node from the end of the list and return its head. Example 1: Exampl...
Leetcode 0017. Letter Combinations of a Phone Number
17. Letter Combinations of a Phone Number题目Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could...
Leetcode 0016. 3Sum Closest
16. 3Sum Closest题目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...
Leetcode 0015. 3Sum
15. 3Sum题目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 giv...
Leetcode 0014. Longest Common Prefix
14. Longest Common Prefix题目Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an emp...
Leetcode 0013. Roman to Integer
13. Roman to Integer题目Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, 2 is written as II in Roman numeral,...
Leetcode 0012. Integer to Roman
12. Integer to Roman题目Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, 2 is written as II in Roman numeral,...
Leetcode 0011. Container With Most Water
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 draw...
Leetcode 0010. Regular Expression Matching
10. Regular Expression MatchingGiven an input string s and a pattern p, implement regular expression matching with support for '.' and '*' wh...
Leetcode 0009. Palindrome Number
9. Palindrome Number题目Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Exam...
Leetcode 0008. String to Integer (atoi)
8. String to Integer (atoi)题目Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++'s atoi fu...
Leetcode 0007. Reverse Integer
7. Reverse Integer题目Given a 32-bit signed integer, reverse digits of an integer. Example 1: Example 2: Example 3: **Note:**Assume we are dealing with a...

