Giter VIP home page Giter VIP logo

algorithms's Introduction

Algorithms

  这里有各种算法的C++代码,任何人可以在自己的任何程序中使用。欢迎大家指出代码中的错误以及有待改进的地方。

  本仓库内所有代码的授权方式为The Unlicense。大家如果使用我的代码开发自己的软件挣了大钱,或是参考我的代码在信息学奥林匹克竞赛中获得金牌,我都会很高兴的。使用这里的代码之后,你可以自主选择是否公开源代码。总而言之,你可以把这里的代码当作你自己写的一样,无论怎样使用都是被允许的。但是,我不对本仓库内代码的正确性负责。大家要是使用我的代码开发软件而导致程序崩溃,或是参考我的代码在考试时出错,请不要向我抱怨。如果你愿意,遇到问题可以在Issues中提出来,我们共同解决。

  本仓库有两个分支,master和candidate。master用于存放原作者自己编写的代码,candidate接受所有合理的Pull Request。

  以下索引提供了本仓库内算法的中文名,方便大家查找。此列表更新可能有较长时间的延迟,不保证所有已提交算法的名称都在列表中出现。

Index

--------------------------Contents-------------------------- --------------------------FileName--------------------------
2-SAT可满足性 2-Satisfiability
AC自动机 Aho-Corasick-Automaton
单源最短路径(SPFA) Bellman-Ford(Queue-Optimised)
单源最短路径(Bellman-Ford) Bellman-Ford
双连通分量 Biconnected-Compotent
使用Edmonds-Karp进行二分图匹配 Bigrpah-Matching(Edmonds-Karp)
使用ISAP算法进行二分图匹配 Bigraph-Matching(Improved-Shortest-Augmenting-Path)
普通的二叉搜索树 Binary-Search-Tree
广度优先搜索 Breadth-First-Search
冒泡排序 Bubble-Sort
桶排序 Bucket-Sort
笛卡尔树 Cartesian-Tree
求解多边形的重心 Centre-of-Gravity(Polygon)
组合数的递推求解 Combination(Recursion)
枚举组合 Combination
基本的复数类 Complex-Number
割点 Cut-Vertex
深度优先搜索 Depth-First-Search
堆优化的Dijkstra算法 Dijkstra(Heap-Optimised)
Dinic最大流算法 Dinic
并查集 Disjoint-Set-Union
最大流Edmonds-Karp算法 Edmonds-Karp
欧拉函数的线性筛法 Euler's-Totient-Function(Linear)
欧拉函数 Euler's-Totient-Function
有向图的欧拉回路 Eulerian-Tour(Digraph)
拓展欧几里得算法 Extended-Euclid
快速幂 Fast-Exponentiation
快速数论变换(NTT) Fast-Number-Theoretic-Transform
树状数组 Fenwick-Tree
斐波那契堆 Fibonacci-Heap
所有结点对之间的最短路径(Floyd) Floyd-Warshall
高斯消元 Gaussian-Elimination
凸包算法(Graham扫描法) Graham-Scan
辗转相除法求最大公约数 Greatest-Common-Divisor
堆排序 Heap-Sort
树链剖分(轻重链剖分) Heavy-Light-Decomposition
高精度类 High-Precision(Integer)
匈牙利算法 Hungarian-Algorithm
具有gap优化的ISAP算法 Improved-Shortest-Augmenting-Path(Gap-Optimised)
朴素的ISAP算法 Improved-Shortest-Augmenting-Path(Naive)
插入排序 Insertion-Sort
K-D树 K-Dimensional-Tree
KMP算法 Knuth-Morris-Pratt
Kruskal算法 Kruskal
最近公共祖先(Tarjan) Least-Common-Ancestor(Tarjan)
左偏树 Leftist-Tree
线性基 Linear-Basis
LCT Link-Cut-Tree
LCT(带翻转) Link-Cut-Tree(with-Reverse)
使用后缀数组求解最长公共子串 Longest-Common-Substring
最长上升子序列(n·log(n)) Longest-Increasing-Subsequence(n·log(n))
倍增法求最近公共祖先 Lowest-Common-Ancestor(Doubling)
朴素的矩阵乘法 Matrix-Multiplication(Naive)
归并排序 Merge-Sort
Miller-Rabin素数测试 Miller-Rabin
最小堆 Min-Heap
阶乘的乘法逆元线性筛 Modular-Multiplicative-Inverse(Factorial,Linear)
乘法逆元线性筛 Modular-Multiplicative-Inverse(Linear)
乘法逆元 Modular-Multiplicative-Inverse
无旋式Treap Non-Rotating-Treap
回文树 Palindromic-Tree
枚举排列 Permutation
可持久化数组 Persistent-Array
仅支持单点修改的可持久化线段树(维护区间和值) Persistent-Segment-Tree(Sum)
可持久化Treap Persistent-Treap
可持久化Trie Persistent-Trie
Prim算法 Prim
试除法素数测试 Prime-Check(Naive)
线性的素数筛法 Prime-Sieve(Linear)
原根 Primitive-Root
Prüfer序列 Prüfer-Sequence(Tree-to-Sequence)
队列的基本操作 Queue
快速排序的优化版本 Quick-Sort(Extra-Optimised)
快速排序的随机化版本 Quick-Sort(Randomized)
快速排序 Quick-Sort
基数排序 Radix-Sort
使用归并排序求逆序对个数 Reverse-Pair(Merge-Sort)
使用向量叉积判断两个有向线段的时针关系 Segment-Direction
求两个线段的交点 Segment-Intersection
线段树维护区间最小值 Segment-Tree(Minimum)
线段树维护区间和值 Segment-Tree(Sum)
选择排序 Selection-Sort
普通的选择算法 Selection
希尔排序 Shell-Sort(Shell's-Gap-Sequence)
Eratosthenes素数筛法 Sieve-of-Erotosthenes
指针版的单向链表 Singly-Linked-List(Pointer)
跳表 Skip-List
ST表 Sparse-Table
记录父结点的伸展树 Splay-with-Parent(Array)
伸展树 Splay
单旋“伸展树” Splay(Single-Rotation)
博弈论SG函数 Sprague-Grundy
栈的基本操作 Stack
递推法求解无符号第一类斯特林数 Stirling-Number(Cycle,Unsigned,Recursion)
递推法求解第二类斯特林数 Stirling-Number(Subset,Recursion)
倍增法求解后缀数组 Suffix-Array(Doubling)
倍增法求解后缀数组(附带Height数组) Suffix-Array-with-Height(Doubling)
后缀自动机 Suffix-Automaton
使用Tarjan算法求解强连通分量 Tarjan(Strongly-Connected-Components)
Treap Treap
数组版的字典树 Trie(Array)
指针版的字典树 Trie(Pointer)

algorithms's People

Contributors

dev-xys avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.