This repo contains some of my personal solutions to LeetCode, Codeforces, Luogu (Chinese only) problems, as well as some frequently used templates. Most code are tested on GNU G++17 7.3.0
-
Sliding Window, Monotone Stack/Queue
-
Union Find
-
Trie
-
Prefix Sum, Difference
-
Segment Tree, Fenwick Tree tutorial
-
Sparse Table
-
Sqrt Decomposition
-
BST: Treap, Splay, AVL
-
Sqrt Tree
-
Greedy
-
Basic DP
-
BFS, DFS (Backtrack)
-
Dijkstra's algorithm, SPFA
-
Floyd-Warshall algorithm
-
Tarjan's SCC algorithm
-
Diameter tutorial
-
Heavy-light decomposition
-
Matching Problems
- Binomial Coefficients