源代码请移步我的Github站点https://github.com/cloudzfy/leetcode
- Two Sum
- Add Two Numbers
- Longest Substring Without Repeating Characters
- Median of Two Sorted Arrays
- Longest Palindromic Substring
- ZigZag Conversion
- Reverse Integer
- String to Integer (atoi)
- Palindrome Number
- Regular Expression Matching
- Container With Most Water
- Integer to Roman
- Roman to Integer
- Longest Common Prefix
- 3Sum
- 3Sum Closest
- Letter Combinations of a Phone Number
- 4Sum
- Remove Nth Node From End of List
- Valid Parentheses
- Merge Two Sorted Lists
- Generate Parentheses
- Merge k Sorted Lists
- Swap Nodes in Pairs
- Reverse Nodes in k-Group
- Remove Duplicates from Sorted Array
- Remove Element
- Implement strStr()
- Divide Two Integers
- Substring with Concatenation of All Words
- Next Permutation
- Longest Valid Parentheses
- Search in Rotated Sorted Array
- Search for a Range
- Search Insert Position
- Valid Sudoku
- Sudoku Solver
- Count and Say
- Combination Sum
- Combination Sum II
- First Missing Positive
- Trapping Rain Water
- Multiply Strings
- Wildcard Matching
- Jump Game II
- Permutations
- Permutations II
- Rotate Image
- Group Anagrams
- Pow(x, n)
- N-Queens
- N-Queens II
- Maximum Subarray
- Spiral Matrix
- Jump Game
- Merge Intervals
- Insert Interval
- Length of Last Word
- Spiral Matrix II
- Permutation Sequence
- Rotate List
- Unique Paths
- Unique Paths II
- Minimum Path Sum
- Valid Number
- Plus One
- Add Binary
- Text Justification
- Sqrt(x)
- Climbing Stairs
- Simplify Path
- Edit Distance
- Set Matrix Zeroes
- Search a 2D Matrix
- Sort Colors
- Minimum Window Substring
- Combinations
- Subsets
- Word Search
- Remove Duplicates from Sorted Array II
- Search in Rotated Sorted Array II
- Remove Duplicates from Sorted List II
- Remove Duplicates from Sorted List
- Largest Rectangle in Histogram
- Maximal Rectangle
- Partition List
- Scramble String
- Merge Sorted Array
- Gray Code
- Subsets II
- Decode Ways
- Reverse Linked List II
- Restore IP Addresses
- Binary Tree Inorder Traversal
- Unique Binary Search Trees II
- Unique Binary Search Trees
- Interleaving String
- Validate Binary Search Tree
- Recover Binary Search Tree
- Same Tree
- Symmetric Tree
- Binary Tree Level Order Traversal
- Binary Tree Zigzag Level Order Traversal
- Maximum Depth of Binary Tree
- Construct Binary Tree from Preorder and Inorder Traversal
- Construct Binary Tree from Inorder and Postorder Traversal
- Binary Tree Level Order Traversal II
- Convert Sorted Array to Binary Search Tree
- Convert Sorted List to Binary Search Tree
- Balanced Binary Tree
- Minimum Depth of Binary Tree
- Path Sum
- Path Sum II
- Flatten Binary Tree to Linked List
- Distinct Subsequences
- Populating Next Right Pointers in Each Node
- Populating Next Right Pointers in Each Node II
- Pascal's Triangle
- Pascal's Triangle II
- Triangle
- Best Time to Buy and Sell Stock
- Best Time to Buy and Sell Stock II
- Best Time to Buy and Sell Stock III
- Binary Tree Maximum Path Sum
- Valid Palindrome
- Word Ladder II
- Word Ladder
- Longest Consecutive Sequence
- Sum Root to Leaf Numbers
- Surrounded Regions
- Palindrome Partitioning
- Palindrome Partitioning II
- Clone Graph
- Gas Station
- Candy
- Single Number
- Single Number II
- Copy List with Random Pointer
- Word Break
- Word Break II
- Linked List Cycle
- Linked List Cycle II
- Reorder List
- Binary Tree Preorder Traversal
- Binary Tree Postorder Traversal
- LRU Cache
- Insertion Sort List
- Sort List
- Max Points on a Line
- Evaluate Reverse Polish Notation
- Reverse Words in a String
- Maximum Product Subarray
- Find Minimum in Rotated Sorted Array
- Find Minimum in Rotated Sorted Array II
- Min Stack
- Binary Tree Upside Down
- Read N Characters Given Read4
- Read N Characters Given Read4 II - Call multiple times
- Longest Substring with At Most Two Distinct Characters
- Intersection of Two Linked Lists
- One Edit Distance
- Find Peak Element
- Missing Ranges
- Maximum Gap
- Compare Version Numbers
- Fraction to Recurring Decimal
- Two Sum II - Input array is sorted
- Excel Sheet Column Title
- Majority Element
- Two Sum III - Data structure design
- Excel Sheet Column Number
- Factorial Trailing Zeroes
- Binary Search Tree Iterator
- Dungeon Game
- Largest Number
- Reverse Words in a String II
- Repeated DNA Sequences
- Best Time to Buy and Sell Stock IV
- Rotate Array
- Reverse Bits
- Number of 1 Bits
- House Robber
- Binary Tree Right Side View
- Number of Islands
- Bitwise AND of Numbers Range
- Happy Number
- Remove Linked List Elements
- Count Primes
- Isomorphic Strings
- Reverse Linked List
- Course Schedule
- Implement Trie (Prefix Tree)
- Minimum Size Subarray Sum
- Course Schedule II
- Add and Search Word - Data structure design
- Word Search II
- House Robber II
- Shortest Palindrome
- Kth Largest Element in an Array
- Combination Sum III
- Contains Duplicate
- The Skyline Problem
- Contains Duplicate II
- Contains Duplicate III
- Maximal Square
- Count Complete Tree Nodes
- Rectangle Area
- Basic Calculator
- Implement Stack using Queues
- Invert Binary Tree
- Basic Calculator II
- Summary Ranges
- Majority Element II
- Kth Smallest Element in a BST
- Power of Two
- Implement Queue using Stacks
- Number of Digit One
- Palindrome Linked List
- Lowest Common Ancestor of a Binary Search Tree
- Lowest Common Ancestor of a Binary Tree
- Delete Node in a Linked List
- Product of Array Except Self
- Sliding Window Maximum
- Search a 2D Matrix II
- Different Ways to Add Parentheses
- Valid Anagram
- Shortest Word Distance
- Shortest Word Distance II
- Shortest Word Distance III
- Strobogrammatic Number
- Strobogrammatic Number II
- Strobogrammatic Number III
- Group Shifted Strings
- Count Univalue Subtrees
- Flatten 2D Vector
- Meeting Rooms
- Meeting Rooms II
- Factor Combinations
- Verify Preorder Sequence in Binary Search Tree
- Paint House
- Binary Tree Paths
- Add Digits
- 3Sum Smaller
- Single Number III
- Graph Valid Tree
- Ugly Number
- Ugly Number II
- Paint House II
- Palindrome Permutation
- Palindrome Permutation II
- Missing Number
- Alien Dictionary
- Closest Binary Search Tree Value
- Encode and Decode Strings
- Closest Binary Search Tree Value II
- Integer to English Words
- H-Index
- H-Index II
- Paint Fence
- Find the Celebrity
- First Bad Version
- Perfect Squares
- Wiggle Sort
- Zigzag Iterator
- Expression Add Operators
- Move Zeroes
- Peeking Iterator
- Inorder Successor in BST
- Walls and Gates
- Find the Duplicate Number
- Unique Word Abbreviation
- Game of Life
- Word Pattern
- Word Pattern II
- Nim Game
- Flip Game
- Flip Game II
- Find Median from Data Stream
- Best Meeting Point
- Serialize and Deserialize Binary Tree
- Binary Tree Longest Consecutive Sequence
- Bulls and Cows
- Longest Increasing Subsequence
- Remove Invalid Parentheses
- Smallest Rectangle Enclosing Black Pixels
- Range Sum Query - Immutable
- Range Sum Query 2D - Immutable
- Number of Islands II
- Additive Number
- Range Sum Query - Mutable
- Range Sum Query 2D - Mutable
- Best Time to Buy and Sell Stock with Cooldown
- Minimum Height Trees
- Sparse Matrix Multiplication
- Burst Balloons
- Super Ugly Number
- Binary Tree Vertical Order Traversal
- Count of Smaller Numbers After Self
- Remove Duplicate Letters
- Shortest Distance from All Buildings
- Maximum Product of Word Lengths
- Bulb Switcher
- Generalized Abbreviation
- Create Maximum Number
- Coin Change
- Number of Connected Components in an Undirected Graph
- Wiggle Sort II
- Maximum Size Subarray Sum Equals k
- Power of Three
- Count of Range Sum
- Odd Even Linked List
- Longest Increasing Path in a Matrix
- Patching Array
- Verify Preorder Serialization of a Binary Tree
- Reconstruct Itinerary
- Largest BST Subtree
- Increasing Triplet Subsequence
- Self Crossing
- Palindrome Pairs
- House Robber III
- Counting Bits
- Nested List Weight Sum
- Longest Substring with At Most K Distinct Characters
- Flatten Nested List Iterator
- Power of Four
- Integer Break
- Reverse String
- Reverse Vowels of a String
- Moving Average from Data Stream
- Top K Frequent Elements
- Design Tic-Tac-Toe
- Intersection of Two Arrays
- Intersection of Two Arrays II
- Android Unlock Patterns
- Data Stream as Disjoint Intervals
- Design Snake Game
- Russian Doll Envelopes
- Design Twitter
- Line Reflection
- Count Numbers with Unique Digits
- Rearrange String k Distance Apart
- Logger Rate Limiter
- Sort Transformed Array
- Bomb Enemy
- Design Hit Counter
- Max Sum of Rectangle No Larger Than K
- Nested List Weight Sum II
- Water and Jug Problem
- Find Leaves of Binary Tree
- Valid Perfect Square
- Largest Divisible Subset
- Plus One Linked List
- Range Addition
- Sum of Two Integers
- Super Pow
- Find K Pairs with Smallest Sums