Transfer from TANGJZ Blog ... Basic algorithm Simulation Search
- Breadth First search (BFS)
- Optimization: two-way BFS
- Depth-First search (DFS)
- Optimization: Binary DFS
- Iterative deepening Search (IDS)
- Heuristic Search (Astar)
- Optimization: Idastar
- Optimization: pruning, bitwise arithmetic
Sort
- Bubble sort/Select sort
- Cardinal Sort/Bucket sort
- Count sort
- Insert Sort/Hill Sort
- Quick Sort
- Merge sort/Find inverse logarithm
- Heap Sort
Greedy Divide and conquer
- Split/three Min/n
- CDQ Divided treatment
Multiply/st Discretization of Two-point answer Fast Power/decimal fast Power Basic mathematicsSum of series Taylor unfold Matrix
- Matrix multiplication
- Gaussian elimination element
- Judging linear correlation
Number of Catalan Combinatorial mathematics
- Addition principle/multiplication principle
- Combined number recursion/Yang Hui triangle
- Two-term theorem
- Drawer principle/pigeon cage principle
- Lucas theorem
- Principle of tolerance and repulsion
Arithmetical/miller-rabin test of prime number determination Decomposition factorization/ask for approximate Euclidean algorithm/Euclidean method Extended Euclidean algorithm/multiplicative inverse/Two-element one-time congruence equation Linear preprocessing 1-n multiplication inverse element Prime sieve
- Eratosthenes Sieve
- Euler sieve
Euler functions Möbius function Fermat theorem Wilson's theorem Chinese remainder theorem/grandson theorem Two times remaining/cipolla ' s algorithm Original root Discrete logarithm/baby-step giant-step Group theoryReplacement Burnside lemma Polya theorem Dynamic planningBackpack DP
- 01 Backpack
- Full backpack
- Multiple backpack
- Mixed backpack
- Two-dimensional backpack
- Group Backpack
- Tree-shaped backpack
- Generic backpack
by dimension
- Linear DP
- Interval DP
- High-dimensional DP
By type
- Divide DP
- Longest ascending subsequence (LIS)
- Longest common sub-sequence (LCS)
- DP on a directed acyclic graph (DAG)
- (Connectivity-based) state compression DP
Optimization
- Scrolling array
- Prefixes and
- Quadrilateral inequalities
- Slope optimization
- Bit arithmetic
- Data
- CDQ Divided treatment
Skills
- Memory Search
- Shun Push/Reverse push
- Minimal notation
Graph theoryConnectivity of
- The traversal of graphs
- Topological sorting
- Strong Unicom Component
- /tarjan algorithm of Cutting point, bridge and double-link component
Tree
- Recent public ancestor (LCA)/tarjan algorithm
- The Center/diameter of the tree
- The center of the tree
- Isomorphism of Trees
Shortest circuit
- Multi-source Shortest path (APSP)/floyd
- Minimum ring
- Transitive closures
- Single Source Shortest path (SSSP)/queue+bellman-ford/heap+dijkstra
Spanning tree
- Minimum spanning tree
- Minimum scale spanning tree
- Minimum bottleneck tree
Two-part diagram
- Two-part diagram verification
- Two-part graph dyeing
- Max match/Hungarian algorithm
- Optimal matching/km algorithm
Network flow
- Dinic algorithm
- ISAP algorithm
- Pre-flow propulsion algorithm
- Tip: Break a point
- Optimization: Close/close Edge
- Optimization: Line segment Tree
DataHigh precision
- High precision subtraction for low precision
- High precision subtraction for high precision
- Optimization: Fast Fourier transform
Linked list
- Single doubly linked list
- Block Linked list
- adjacency Table/Benzi
Stack Queue
- Loop queue
- Priority queue/Minimum binary heap
- Left-leaning tree
- Fibonacci Heap
Tree
- Binary search Tree
- Heap (IBID.)
- Flute Karlshu
- Tree-like array
- Segment Tree
- Expansion: Dynamic segment tree, four-point tree
- Weight Balance Tree
- Stretching tree
and check Set Hash table (hash) Self-Motive String
- Trie Tree
- Kmp
- Manacher
- AC Automaton (Aho-corasick automaton)
- Suffix array/suffix tree/suffix automaton/suffix balance tree, etc.
Dynamic tree
- Tree chain split/tree block split
- Link-cut Tree/euler-tour Tree
Calculate geometryPlane geometry/geometric/analytic geometry/parametric equations Determining point-to-polygon relationship (corner method/Scan line method) Polygon Area intersection/area and Polar sort Convex hull/Rotating jam Semi-planar Cross Triangulation of/voronoi diagram Game theorySG Combo Game/sg function Bash games/wythoff Games/nim Games Fight Search Probability theoryFull probability Bayes theorem Markov process Chebyshev theorem MiscellaneousChunking Random adjustment/Simulated annealing/random mountain climbing Simplex method |