• leetcode分类总结
  • Introduction
  • 1. 求和问题2sum, 3sum, k sum...
    • 1.1. Two Sum (sorted)
    • 1.2. Two Sum Data Structure
    • 1.3. 3 sum
    • 1.4. 3 sum closest
    • 1.5. 3 sum smaller
    • 1.6. 4 sum
  • 2. Math
    • 2.1. Math Without Operator
      • 2.1.1. Divide Two Integers
      • 2.1.2. Multiply Two Integers
      • 2.1.3. Add Two Integers
      • 2.1.4. A Minus B
    • 2.2. Ugly Number
    • 2.3. Ugly Number II
    • 2.4. Add Digits
    • 2.5. Add Binary
    • 2.6. Trailing Zeroes
    • 2.7. Max Points on a Line
    • 2.8. Palindrome Number
    • 2.9. AtoI
    • 2.10. Count Primes
    • 2.11. Reverse Integer
    • 2.12. Roman to Integer
    • 2.13. Integer to Roman
    • 2.14. Multiply Strings
    • 2.15. Rectangle Area
    • 2.16. Perfect Square
    • 2.17. Valid Number(hard)
    • 2.18. 其他进制数字
      • 2.18.1. Excel sheet Column Number
      • 2.18.2. Excel Sheet Column Title
  • 3. Bit Manipulation
    • 3.1. XOR
      • 3.1.1. Single Number
      • 3.1.2. Single Number II
      • 3.1.3. Single Number III
      • 3.1.4. Single Number IV
      • 3.1.5. Missing Number
    • 3.2. &操作
      • 3.2.1. Number of 1 bits
      • 3.2.2. Power of Two
    • 3.3. Shift
      • 3.3.1. Reverse Bits
    • 3.4. Math
      • 3.4.1. Repeated DNA Sequence
      • 3.4.2. Bitwise AND of Number RANGE
  • 4. linked list
    • 4.1. Add two numbers
    • 4.2. Remove Duplicates
    • 4.3. Remove Duplicates II
    • 4.4. Merge
      • 4.4.1. Merge Two Sorted List
      • 4.4.2. Merge K Sorted List
    • 4.5. two pointer
      • 4.5.1. List Cycle
      • 4.5.2. List Cycle II
      • 4.5.3. Remove Nth node from the end
      • 4.5.4. Partition List
    • 4.6. Reverse
      • 4.6.1. Reverse List
      • 4.6.2. Reverse List II
      • 4.6.3. Reverse Nodes in K Group
      • 4.6.4. Palindrome List
      • 4.6.5. Swap nodes in pairs
      • 4.6.6. Reorder List
    • 4.7. Rotate List
    • 4.8. Copy List with Random Pointer
    • 4.9. Convert Sorted List to BST
    • 4.10. Intersection of 2 Lists
  • 5. greedy
    • 5.1. Jump Game
    • 5.2. Jump Game II
    • 5.3. Gas Station
    • 5.4. Candy
    • 5.5. Product of Array except self
  • 6. Binary Tree
    • 6.1. Traversal
      • 6.1.1. Pre-order
      • 6.1.2. In-order
      • 6.1.3. Post-order
      • 6.1.4. Level-Order
      • 6.1.5. Level-Order 2
      • 6.1.6. ZigZag
    • 6.2. Recursion
      • 6.2.1. Binary Tree Max Depth
      • 6.2.2. Binary Tree Min Depth
      • 6.2.3. Balanced Binary Tree
      • 6.2.4. Symmetric Binary Tree
      • 6.2.5. Valid Binary Search Tree
      • 6.2.6. Flatten Binary Tree to Linked list
      • 6.2.7. Lowest Common Ancestor in Binary Tree
      • 6.2.8. Binary Tree Longest Consecutive Sequence
      • 6.2.9. Recover Binary Tree
    • 6.3. Count Complete Tree Nodes
    • 6.4. Binary Tree Max Path Sum
    • 6.5. Construct binary tree from inorder and preorder
    • 6.6. Construct binary tree from inorder and postorder
    • 6.7. Unique Binary Search Tree
    • 6.8. Unique Binary Search Tree II
  • 7. Tree
    • 7.1. 树的遍历
  • 8. BFS
    • 8.1. Binary Tree Right Side View
    • 8.2. Populate next right pointer
    • 8.3. Populate next right pointer II
    • 8.4. Word ladder
    • 8.5. Word Ladder II
  • 9. DFS
    • 9.1. Path Sum
    • 9.2. Path Sum II
    • 9.3. Sum Root to leaf numbers
    • 9.4. Word Break II
  • 10. Graph
    • 10.1. Copy Graph
  • 11. Binary Search
    • 11.1. 四种基本类型
    • 11.2. 第一类
    • 11.3. 第二类
    • 11.4. 第三类
    • 11.5. 第四类
    • 11.6. find kth(重点)
    • 11.7. Longest Increasing Subsequence
    • 11.8. Smallest Rectangle Enclosing Black Pixels
  • 12. Sort
    • 12.1. 非基于比较的排序
    • 12.2. Wiggle Sort
    • 12.3. Sort Colors
    • 12.4. Sort List
    • 12.5. Insertion Sort List
    • 12.6. Maximum Gap
    • 12.7. Meeting Point
    • 12.8. Comparator
      • 12.8.1. Meeting Rooms
      • 12.8.2. Meetings Rooms II
      • 12.8.3. Insert Intervals
      • 12.8.4. Merge Intervals
      • 12.8.5. Largest Number
    • 12.9. Bucket Sort
      • 12.9.1. First Missing Positive
  • 13. Sorted Matrix
  • 14. Dynamic Programming
    • 14.1. 一维DP
      • 14.1.1. Triangle
      • 14.1.2. Pascal Triangle
      • 14.1.3. Pascal Triangle
      • 14.1.4. House Robber
      • 14.1.5. House Robber II
      • 14.1.6. Best time to buy and sell stock I, II, III, IV
      • 14.1.7. Stock with cooldown
      • 14.1.8. Word Break
    • 14.2. 二维DP
      • 14.2.1. dungeon game
      • 14.2.2. Max Rectangle
      • 14.2.3. Pascal Triangle
      • 14.2.4. Pascal Triangle II
      • 14.2.5. Max Square
      • 14.2.6. Edit Distance
    • 14.3. Hard problems
      • 14.3.1. Regular Expression Matching
      • 14.3.2. Wildcard Matching
  • 15. Array
    • 15.1. Find Two Repeating Elements
    • 15.2. Find Duplicates
    • 15.3. Move Zeroes
    • 15.4. Remove Element
    • 15.5. Spiral Matrix
    • 15.6. Spiral Matrix II
    • 15.7. Remove duplicates in sorted array
    • 15.8. Remove duplicates in sorted array II
    • 15.9. Longest Consecutive Sequence
    • 15.10. One Edit Distance
    • 15.11. Majority
      • 15.11.1. Majority Number
      • 15.11.2. Majority Number II
      • 15.11.3. Majority Number III
    • 15.12. Subarray
      • 15.12.1. Maximum Subarray Sum
      • 15.12.2. Maximum Subarray Product
      • 15.12.3. Product of Array except itself
  • 16. Back Tracking
    • 16.1. Subset and Permutation
      • 16.1.1. [类型1]
        • 16.1.1.1. Subsets
        • 16.1.1.2. Subsets II
        • 16.1.1.3. Permutations
        • 16.1.1.4. Permutations II
        • 16.1.1.5. Combinations
        • 16.1.1.6. Combinations Sum
        • 16.1.1.7. Combinations Sum II
        • 16.1.1.8. Combinations Sum III
        • 16.1.1.9. Letter Combination of Phone Number
        • 16.1.1.10. Generate Parentheses
      • 16.1.2. [类型2]
        • 16.1.2.1. next Permutation
        • 16.1.2.2. PermutationSequence
        • 16.1.2.3. Permutation Index
        • 16.1.2.4. Permutation Index II
    • 16.2. Sudoku
      • 16.2.1. Valid Sudoku
      • 16.2.2. Sudoku Solver
    • 16.3. flip game
    • 16.4. flip game II
    • 16.5. nim game
    • 16.6. N Queen
    • 16.7. Palindrome Partitioning
    • 16.8. Palindrome Partitioning II
    • 16.9. Palindrome Permutation
    • 16.10. Palindrome Permutation II
    • 16.11. Additive Number
  • 17. Two Pointer
    • 17.1. Minimum Size Subarray Sum
    • 17.2. Valid Palindrome
    • 17.3. Container with most water
    • 17.4. Trapping Water
    • 17.5. Rotate List
  • 18. Divide and Conquer
    • 18.1. Kth Largest Element
  • 19. Quick Select
    • 19.1. Find kth largest Element
    • 19.2. Sort Colors
    • 19.3. Sort Colors II
  • 20. Hash Table
    • 20.1. Array
      • 20.1.1. Contains Duplicate
      • 20.1.2. Contains Duplicate 2
      • 20.1.3. Contains Duplicate 3
      • 20.1.4. Shortest Word Distance
      • 20.1.5. Shortest Word Distance 2
      • 20.1.6. Shortest Word Distance 3
    • 20.2. Number
      • 20.2.1. Happy Number
    • 20.3. String
      • 20.3.1. Longest Substring without repeat characters
      • 20.3.2. Longest Substring with at most k Distinct Characters
      • 20.3.3. Minimum Window Substring
      • 20.3.4. Substring with Concatenation of All Words
      • 20.3.5. Palindrom Permutation
      • 20.3.6. Group shift Number
      • 20.3.7. Unique Abbreviation
  • 21. Stack
    • 21.1. Implement stack with queue
    • 21.2. Implement queue with stack
    • 21.3. Min Stack
    • 21.4. String
      • 21.4.1. Valid Parenthesis
      • 21.4.2. Evaluate Reverse Polish Notation
      • 21.4.3. Largest Rectangel in Histrogram
      • 21.4.4. Maximal Rectangle
      • 21.4.5. Simplify Path
    • 21.5. Reverse polish notation
  • 22. Heap
    • 22.1. Closest Binary Search Tree Value
    • 22.2. Sliding Window Maximum
  • 23. String
    • 23.1. Count and Say
    • 23.2. Zigzag Conversion
    • 23.3. Length of Last word
    • 23.4. Compare Version Number
    • 23.5. Reverse Words in a String
    • 23.6. Reverse Words in a String II
    • 23.7. Palindrome
      • 23.7.1. Longest Palindromic Substring
      • 23.7.2. Shortest Palindrome
    • 23.8. Anagram
    • 23.9. Group Anagram
Powered by GitBook

leetcode分类总结