MCPcopy Create free account

hub / github.com/ShahjalalShohag/code-library / functions

Functions3,514 in github.com/ShahjalalShohag/code-library

↓ 1 callersMethodbuild
create a segment tree with only node i
Data Structures/Segment Tree Merging.cpp:27
↓ 1 callersMethodbuild
Data Structures/Persistent Queue.cpp:11
↓ 1 callersMethodbuild
Data Structures/Permutation Tree.cpp:26
↓ 1 callersMethodbuild
Data Structures/Reachability Tree.cpp:26
↓ 1 callersMethodbuild
Data Structures/Segment Tree Persistent Lazy.cpp:43
↓ 1 callersMethodbuild
Data Structures/HLD.cpp:29
↓ 1 callersMethodbuild
b = 0, e = 2^LOG - 1 O(LOG 2^LOG)
Data Structures/XOR Segment Tree.cpp:20
↓ 1 callersMethodbuild
Data Structures/Persistent Array.cpp:11
↓ 1 callersMethodbuild
Graph Theory/LCA in O(1).cpp:8
↓ 1 callersMethodbuild
Graph Theory/Path Union.cpp:66
↓ 1 callersFunctionbuild_lps
returns the longest proper prefix array of pattern p where lps[i]=longest proper prefix which is also suffix of p[0...i]
Strings/KMP.cpp:8
↓ 1 callersFunctionbuildtree
given specific nodes, construct a compressed directed tree with these vertices(if needed some other nodes included) returns the nodes of the tree node
Graph Theory/Virtual Tree.cpp:44
↓ 1 callersMethodcalc_occurrences
Strings/Minimum Palindrome Factorization.cpp:74
↓ 1 callersMethodcalc_occurrences
Strings/Palindromic Tree.cpp:62
↓ 1 callersFunctioncalc_sz
Data Structures/Centroid Decomposition Persistent.cpp:41
↓ 1 callersFunctioncalc_sz
Data Structures/Binarizing a Tree.cpp:43
↓ 1 callersFunctioncalc_sz
Data Structures/Centroid Decomposition.cpp:9
↓ 1 callersFunctioncalc_sz
Graph Theory/Tree Orientation.cpp:10
↓ 1 callersFunctioncalc_sz
Graph Theory/Number of Paths of Each Length in a Tree.cpp:59
↓ 1 callersFunctioncan
check if solution exists for some (p, q)
Number Theory/Linear Diophantine With N Unknowns and Two Equations.cpp:45
↓ 1 callersFunctioncartesian_tree
O(n) returns root of the tree has max heap property
Data Structures/Cartesian Tree.cpp:36
↓ 1 callersFunctioncatalan
Math/NTT Online (D&C).cpp:118
↓ 1 callersFunctioncheck
Math/Finite Field Arithmetic Binary.cpp:73
↓ 1 callersFunctioncheck_power_of_2
Checks if x is a power of 2
Basics/Bitwise Operations.cpp:56
↓ 1 callersMethodchirpz_even
Math/Polynomial.cpp:360
↓ 1 callersMethodchirpz_even
Math/Faulhaber Formula Fastest.cpp:311
↓ 1 callersFunctionchromatic_number
O(n*2^n)
Graph Theory/Chromatic Number.cpp:6
↓ 1 callersFunctioncirc
Geometry/Voronoi Diagram.cpp:36
↓ 1 callersFunctioncirc
Geometry/Delaunay Triangulation.cpp:37
↓ 1 callersFunctioncircle
Geometry/Delaunay Triangulation.cpp:135
↓ 1 callersFunctioncircle_circle_intersection
Geometry/Geometry 2D.cpp:342
↓ 1 callersFunctionclosest_on_l1
closest point from line l2 to line l1
Geometry/Geometry 3D.cpp:200
↓ 1 callersFunctionclosest_pair
Geometry/Closest Pair of Points.cpp:10
↓ 1 callersFunctioncmp
Strings/Suffix Array Isomorphic.cpp:9
↓ 1 callersMethodcmp
Data Structures/Segment Tree Persistent Lazy.cpp:82
↓ 1 callersFunctioncnt
Number Theory/Discrete Root Faster.cpp:10
↓ 1 callersMethodcombine
Miscellaneous/Maximum of Sum of All Pair Distances of K nodes in a Tree.cpp:96
↓ 1 callersMethodcombine
Data Structures/Treap.cpp:67
↓ 1 callersMethodcompute
Strings/Aho Corasick.cpp:33
↓ 1 callersFunctioncompute_automaton
Strings/Prefix Automaton.cpp:27
↓ 1 callersFunctioncongruence_equation
ax = b (mod m)
Number Theory/Linear Congruence Equation.cpp:24
↓ 1 callersFunctionconstructMatrix
Math/FWHT in Any Base.cpp:31
↓ 1 callersFunctionconvergents
ans[k] = [a[0]; a[1], ..., a[k]]
Number Theory/Continued Fractions.cpp:18
↓ 1 callersFunctioncoprime
Number Theory/Maximum Coprime Product.cpp:15
↓ 1 callersFunctioncount
number of solutions to ax + by + cz = n s.t. x, y, z >= 0 a, b, c >= 1, a, b and c are pairwise coprime O(log(max(a, b, c)));
Number Theory/Linear Diophantine Equation Three Variables with Nonnegative Solutions.cpp:36
↓ 1 callersMethodcount
Data Structures/Persistent UnionFind.cpp:89
↓ 1 callersMethodcount
count of numbers in [l, r] equal to k
Data Structures/Wavelet Tree.cpp:64
↓ 1 callersMethodcount
Graph Theory/Kirchoffs Theorem.cpp:62
↓ 1 callersFunctioncount_except_xor_0
number of length n sequences with elements in [0, 2^k) such that no subset has xor 0 = number of length n independent subsets of elements in [0, 2^k)
Math/q Binomial.cpp:137
↓ 1 callersFunctioncount_except_xor_1
number of length n sequences with elements in [0, 2^k) such that no subset has xor 1
Math/q Binomial.cpp:150
↓ 1 callersFunctioncount_rank_r_except_xor_1
number of length n sequences with elements in [0, 2^k) such that no subset has xor 1 and its basis has size r not sure for general q, maybe also multi
Math/q Binomial.cpp:144
↓ 1 callersMethodcross
Geometry/Onion Decomposition.cpp:9
↓ 1 callersMethodcut
cut the left part of the line from point a to point b
Geometry/Half Plane Intersection Dynamic.cpp:91
↓ 1 callersMethodcut
Data Structures/Link Cut Tree.cpp:114
↓ 1 callersMethodcut_right
Data Structures/Top Tree.cpp:276
↓ 1 callersFunctioncycle3
degrees, precalc it m.sqrt(m)
Graph Theory/3 CYCLE and 4 CYCLE.cpp:14
↓ 1 callersFunctioncycle4
m.sqrt(m)
Graph Theory/3 CYCLE and 4 CYCLE.cpp:43
↓ 1 callersFunctioncyclic_convolution
ans[k] = sum(a[i] * b[j]) over 0 <= i < n and j - i = k
Math/Cyclic Convolution.cpp:53
↓ 1 callersFunctionde_bruijn
Strings/De Bruijn Sequence.cpp:9
↓ 1 callersFunctiondecimal
https://en.wikipedia.org/wiki/Negative_base
Miscellaneous/Negative Base (Binary).cpp:6
↓ 1 callersFunctiondecimal_to_factoradic
Number Theory/Factoradic Number System.cpp:9
↓ 1 callersFunctiondecompose
Data Structures/Centroid Decomposition Persistent.cpp:75
↓ 1 callersFunctiondecompose
Data Structures/Binarizing a Tree.cpp:75
↓ 1 callersFunctiondecompose
Data Structures/Centroid Decomposition.cpp:25
↓ 1 callersFunctiondecompose
Graph Theory/Number of Paths of Each Length in a Tree.cpp:94
↓ 1 callersFunctiondecompose_mod_linear
Decomposes sequence S = { (a*k + b) % m | 0 <= k < n } into O(sqrt(m)) disjoint arithmetic progressions (non-wrapping). Preconditions: gcd(a, m) = 1
Number Theory/Sqrt Decomposition of Mod of Arithmetic Progression.cpp:56
↓ 1 callersFunctiondel
Graph Theory/Boruvka's Algorithm.cpp:20
↓ 1 callersMethoddel
Data Structures/4D MO.cpp:19
↓ 1 callersFunctiondelaunay
Geometry/Voronoi Diagram.cpp:96
↓ 1 callersFunctiondelaunay
Geometry/Delaunay Triangulation.cpp:97
↓ 1 callersFunctiondeleteNode
Deleting a node
Data Structures/BST.cpp:58
↓ 1 callersFunctiondelim
Miscellaneous/Expression Parsing.cpp:4
↓ 1 callersFunctiondet
Graph Theory/Kirchoffs Theorem.cpp:18
↓ 1 callersFunctiondetZero
Math/Finite Field Arithmetic Binary.cpp:57
↓ 1 callersFunctiondeterminant
Graph Theory/Tuttes Theorem.cpp:7
↓ 1 callersFunctiondfs
Dynamic Programming Optimizations/Subset Sum in SQRT.cpp:50
↓ 1 callersFunctiondfs
Dynamic Programming Optimizations/Persistent Li Chao Tree.cpp:85
↓ 1 callersFunctiondfs
Math/Simplex Algorithm.cpp:15
↓ 1 callersFunctiondfs
Math/Basis Vector Reduced Row Echelon Form.cpp:52
↓ 1 callersFunctiondfs
Strings/Aho Corasick All Pair Occurrence Relation.cpp:111
↓ 1 callersFunctiondfs
Game Theory/Green Hackenbush.cpp:38
↓ 1 callersFunctiondfs
Game Theory/Blue Red Hackenbush.cpp:115
↓ 1 callersFunctiondfs
Number Theory/Sum of C(a(i), k) for each k from 1 to n.cpp:113
↓ 1 callersFunctiondfs
Data Structures/4D MO.cpp:58
↓ 1 callersFunctiondfs
Data Structures/MOs on tree.cpp:9
↓ 1 callersFunctiondfs
Data Structures/Dynamic Diameter Online.cpp:64
↓ 1 callersFunctiondfs
Data Structures/Cartesian Tree.cpp:23
↓ 1 callersFunctiondfs
Data Structures/Permutation Tree.cpp:163
↓ 1 callersFunctiondfs
Data Structures/Balanced Bracket Tree.cpp:8
↓ 1 callersFunctiondfs
Data Structures/Centroid Decomposition.cpp:37
↓ 1 callersFunctiondfs
Data Structures/Link Cut Tree.cpp:215
↓ 1 callersFunctiondfs
Data Structures/LCA.cpp:8
↓ 1 callersFunctiondfs
Graph Theory/Block Cut Tree.cpp:8
↓ 1 callersFunctiondfs
Graph Theory/Virtual Tree.cpp:8
↓ 1 callersFunctiondfs
Graph Theory/Tree Orientation.cpp:58
↓ 1 callersFunctiondfs
Graph Theory/Cycle Detection.cpp:10
↓ 1 callersFunctiondfs
Graph Theory/Inverse Graph.cpp:13
↓ 1 callersFunctiondfs
Graph Theory/Kirchoffs Theorem.cpp:97
↓ 1 callersFunctiondfs
number of edges
Graph Theory/Euler Path Undirected.cpp:18
↓ 1 callersFunctiondfs
Graph Theory/Path Intersection.cpp:8
← previousnext →801–900 of 3,514, ranked by callers