Back to Leetcode Go

1.2 Algorithm Knowledge

website/content.en/ChapterOne/Algorithm.md

1.7.977.8 KB
Original Source

Algorithm Knowledge

The following is algorithm-related knowledge compiled by the author. I hope to enumerate all common algorithms exhaustively. If anything is missing, everyone is welcome to give advice and submit PRs. Related problems are still being gradually organized, and explanatory articles are still being created.

Solving problems is only a means to improve algorithmic ability; the ultimate goal should be to improve one's thinking ability. Knowledge needs to be condensed into blocks, so summarize these in the two sections of Chapter 1 and let it be sublimated~ I hope readers will come back to look at this table after finishing problem practice, so they can clearly organize their own knowledge system, check for gaps, and improve it as soon as possible.

AlgorithmSpecific TypeRelated ProblemsExplanatory Articles
Sorting Algorithms1. Bubble Sort
  1. Insertion Sort
  2. Selection Sort
  3. Shell Sort
  4. Quick Sort
  5. Merge Sort
  6. Heap Sort
  7. Linear Sorting Algorithms
  8. Introsort
  9. Indirect Sort
  10. Counting Sort
  11. Radix Sort
  12. Bucket Sort
  13. External Sorting - k-Way Merge Loser Tree
  14. External Sorting - Optimal Merge Tree||| |Recursion and Divide and Conquer||1. Binary Search/Lookup
  15. Multiplication of Large Integers
  16. Strassen Matrix Multiplication
  17. Chessboard Covering
  18. Merge Sort
  19. Quick Sort
  20. Linear-Time Selection
  21. Closest Pair of Points Problem
  22. Round-Robin Tournament Schedule || |Dynamic Programming||1. Matrix Chain Multiplication Problem
  23. Longest Common Subsequence
  24. Maximum Subarray Sum
  25. Optimal Triangulation of Convex Polygons
  26. Polygon Game
  27. Image Compression
  28. Circuit Wiring
  29. Flow Shop Scheduling
  30. 0-1 Knapsack Problem/Nine Lectures on Knapsack
  31. Optimal Binary Search Tree
  32. Principles of Dynamic Programming Acceleration
  33. Tree DP || |Greedy||1. Activity Selection Problem
  34. Optimal Loading
  35. Huffman Coding
  36. Single-Source Shortest Path
  37. Minimum Spanning Tree
  38. Multi-Machine Scheduling Problem || |Backtracking||1. Loading Problem
  39. Batch Processing Job Scheduling
  40. Symbol Triangle Problem
  41. n-Queens Problem
  42. 0-1 Knapsack Problem
  43. Maximum Clique Problem
  44. m-Coloring Problem of Graphs
  45. Traveling Salesman Problem
  46. Circle Arrangement Problem
  47. Circuit Board Arrangement Problem
  48. Continuous Postage Problem || |Search|1. Enumeration
  49. DFS
  50. BFS
  51. Heuristic Search ||| |Randomization|1. Random Numbers
  52. Numerical Randomized Algorithms
  53. Sherwood Algorithm
  54. Las Vegas Algorithm
  55. Monte Carlo Algorithm |1. Calculate the Value of π
  56. Calculate Definite Integrals
  57. Solve Systems of Nonlinear Equations
  58. Linear-Time Selection Algorithm
  59. Skip List
  60. n-Queens Problem
  61. Integer Factorization
  62. Majority Element Problem
  63. Primality Testing || |Graph Theory|1. Traversal DFS / BFS
  64. AOV / AOE Network
  65. Kruskal Algorithm(Minimum Spanning Tree)
  66. Prim Algorithm(Minimum Spanning Tree)
  67. Boruvka Algorithm(Minimum Spanning Tree)
  68. Dijkstra Algorithm(Single-Source Shortest Path)
  69. Bellman-Ford Algorithm(Single-Source Shortest Path)
  70. SPFA Algorithm(Single-Source Shortest Path)
  71. Floyd Algorithm(All-Pairs Shortest Path)
  72. Johnson Algorithm(All-Pairs Shortest Path)
  73. Fleury Algorithm(Eulerian Circuit)
  74. Ford-Fulkerson Algorithm(Augmenting Path for Maximum Network Flow)
  75. Edmonds-Karp Algorithm(Maximum Network Flow)
  76. Dinic Algorithm(Maximum Network Flow)
  77. General Preflow-Push Algorithm
  78. Highest-Label Preflow-Push HLPP Algorithm
  79. Primal-Dual Algorithm(Minimum Cost Flow)18. Kosaraju Algorithm(Strongly Connected Components of Directed Graphs)
  80. Tarjan Algorithm(Strongly Connected Components of Directed Graphs)
  81. Gabow Algorithm(Strongly Connected Components of Directed Graphs)
  82. Hungarian Algorithm(Bipartite Graph Matching)
  83. Hopcroft-Karp Algorithm(Bipartite Graph Matching)
  84. kuhn munkras Algorithm(Best Bipartite Matching)
  85. Edmonds’ Blossom-Contraction Algorithm(General Graph Matching) |1. Graph Traversal
  86. Strong and Weak Connectivity of Directed and Undirected Graphs
  87. Cut Vertices/Cut Edges
  88. AOV Network and Topological Sorting
  89. AOE Network and Critical Path
  90. Minimum-Cost Spanning Tree/Second-Best Minimum Spanning Tree
  91. Shortest Path Problem/K-th Shortest Path Problem
  92. Maximum Network Flow Problem
  93. Minimum Cost Flow Problem
  94. Graph Coloring Problem
  95. Difference Constraints System
  96. Eulerian Circuit
  97. Chinese Postman Problem
  98. Hamiltonian Circuit
  99. Optimal Edge Cut Set/Optimal Vertex Cut Set/Minimum Edge Cut Set/Minimum Vertex Cut Set/Minimum Path Cover/Minimum Vertex Set Cover
  100. Edge Cover Set
  101. Perfect Matching and Maximum Matching Problems in Bipartite Graphs
  102. Cactus Graph
  103. Chordal Graph
  104. Stable Marriage Problem
  105. Maximum Clique Problem || |Number Theory||1. Greatest Common Divisor
  106. Least Common Multiple
  107. Prime Factorization
  108. Primality Testing
  109. Base Conversion
  110. High-Precision Computation
  111. Divisibility Problems
  112. Congruence Problems
  113. Euler's Totient Function
  114. Extended Euclidean Algorithm
  115. Permutation Group
  116. Generating Function
  117. Discrete Transform
  118. Cantor Expansion
  119. Matrix
  120. Vector
  121. System of Linear Equations
  122. Linear Programming || |Geometry||1. Convex Hull - Gift wrapping
  123. Convex Hull - Graham scan
  124. Line Segment Problems
  125. Problems Related to Polygons and Polyhedra || |NP-Complete|1. Computational Model
  126. P-Class and NP-Class Problems
  127. NP-Complete Problems
  128. Approximation Algorithms for NP-Complete Problems |1. Random Access Machine RAM
  129. Random Access Stored Program Machine RASP
  130. Turing Machine
  131. Nondeterministic Turing Machine
  132. P-Class and NP-Class Languages
  133. Polynomial-Time Verification
  134. Polynomial-Time Transformation
  135. Cook's Theorem
  136. Satisfiability Problem of Conjunctive Normal Form CNF-SAT
  137. Satisfiability Problem of 3-Conjunctive Normal Form 3-SAT
  138. Clique Problem CLIQUE
  139. Vertex Cover Problem VERTEX-COVER
  140. Subset Sum Problem SUBSET-SUM
  141. Hamiltonian Circuit Problem HAM-CYCLE
  142. Traveling Salesman Problem TSP
  143. Approximation Algorithm for the Vertex Cover Problem
  144. Approximation Algorithm for the Traveling Salesman Problem
  145. Traveling Salesman Problem with the Triangle Inequality Property
  146. General Traveling Salesman Problem
  147. Approximation Algorithm for the Set Cover Problem
  148. Approximation Algorithm for the Subset Sum Problem
  149. Exponential-Time Algorithm for the Subset Sum Problem
  150. Polynomial-Time Approximation Scheme for the Subset Sum Problem || |Bit Operations| Bit operations include:
  151. NOT
  152. Bitwise OR(OR)
  153. Bitwise XOR(XOR)
  154. Bitwise AND(AND)
  155. Shift: It is a binary operator used to move every bit in a binary number in one direction by a specified number of positions; the overflowing part will be discarded, and the vacant part will be filled with a certain value. | 1.Bitwise AND of Numbers Range 2.UTF-8 Validation 3.Convert a Number to Hexadecimal 4.Find Longest Awesome Substring 5.XOR Operation in an Array 6.Power Set 7.Number of 1 Bits 8.Prime Number of Set Bits in Binary Representation 9.XOR Queries of a Subarray | LeetCode: Bit Manipulation| |------------|------------------------------------------------------------------|-----------------------------------------------------------------|--------------------|