算法编程Algos Programming
不同算法的集合,用于编程比赛,如ACM ICPC。
算法按主题划分。大多数算法都可以从文件中按原样运行。每种算法都有一个参考问题,并对其时间和空间复杂度作了一些说明。
参考:https://github.com/ADJA/algos
算法列表List of algorithms
动态(优化,规划)编程Dynamic Programming
Convex Hull trick – Convex Hull trick is a geometry based dynamic programming modification.
Longest Increasing Sequence – Fast way to find longest increasing subsequence (subsequence in which each next element is greater than previous).
凸壳(面,包,集)技巧–凸壳技巧是基于几何的动态规划修改。
最长递增序列–快速找到最长递增子序列(其中每个下一个元素大于前一个元素的子序列)。
数据结构Data Structures
Cartesian Tree – Cartesian tree is a randomized balanced binary search tree.
Cartesian Tree with implicit keys – Cartesian tree with implicit keys is a powerful modification of cartesian tree, which can be used to solve many interesting problems. This implementation solves the problem of finding range minimum and also can perform reverse of an array segment.
Fenwick tree – Fenwick tree is a simple and easy-to-write data structure which can be used to find the value of some reversible function on the interval and also change the value of some element. This implementation can find the sum on the interval and update any arbitrary element.
Fenwick tree 2D – Extension of Fenwick tree on 2D case. This code can find the sum on the rectangle and update any arbitrary element.
Implicit seg