Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ShahjalalShohag/code-library
/ functions
Functions
3,514 in github.com/ShahjalalShohag/code-library
⨍
Functions
3,514
◇
Types & classes
351
↓ 5 callers
Function
is_point_on_seg
returns true if point p is on line segment ab
Geometry/Geometry 2D.cpp:144
↓ 5 callers
Function
merge
Data Structures/Treap persistent.cpp:53
↓ 5 callers
Function
mul
Math/Finite Field Arithmetic Binary.cpp:11
↓ 5 callers
Function
orientation
Geometry/Voronoi Diagram.cpp:145
↓ 5 callers
Function
power
Number Theory/Number of Distinct Kth Powers Modulo n.cpp:5
↓ 5 callers
Function
power_sum
Number Theory/Generalized Floor Sum of Arithmetic Progressions.cpp:94
↓ 5 callers
Function
power_sum
Number Theory/Sum of Arithmetic Progression Powers Divided.cpp:93
↓ 5 callers
Method
pull
Data Structures/Segment Tree 2D Dynamic.cpp:17
↓ 5 callers
Method
push
Graph Theory/Directed MST.cpp:11
↓ 5 callers
Method
reset
Miscellaneous/Bitset Custom.cpp:38
↓ 5 callers
Function
sign
Dynamic Programming Optimizations/DP on Convex Hulls.cpp:6
↓ 5 callers
Function
spfa
Graph Theory/SPFA.cpp:9
↓ 5 callers
Function
transform
Math/FWHT in Any Base.cpp:54
↓ 5 callers
Method
trim
Miscellaneous/BigInt.cpp:451
↓ 5 callers
Function
update_size
Data Structures/Treap persistent.cpp:31
↓ 5 callers
Method
val
Number Theory/Prime Factorization Fastest.cpp:24
↓ 5 callers
Function
w
the cost function, (i, x]
Dynamic Programming Optimizations/1D1D DP.cpp:18
↓ 4 callers
Method
LTE
count of numbers in [l, r] Less than or equal to k
Strings/Number of Palindromes in Range.cpp:90
↓ 4 callers
Function
MOD
Number Theory/Power Tower.cpp:20
↓ 4 callers
Function
POW
Number Theory/Stirling Number of the First Kind for Fixed k.cpp:9
↓ 4 callers
Method
_Find_next
Miscellaneous/Bitset Custom.cpp:132
↓ 4 callers
Method
abs
Geometry/Geometry 3D.cpp:66
↓ 4 callers
Method
add_edge
Graph Theory/Maximum Closure Problem.cpp:23
↓ 4 callers
Method
add_edge
Graph Theory/Maximum Density Subgraph.cpp:23
↓ 4 callers
Function
add_mod
Number Theory/Pollard Rho.cpp:10
↓ 4 callers
Method
add_segment
Dynamic Programming Optimizations/Li Chao Tree.cpp:18
↓ 4 callers
Function
amin
Dynamic Programming Optimizations/Hirschbergs Algorithm.cpp:10
↓ 4 callers
Function
check
Geometry/Geometry 2D.cpp:1068
↓ 4 callers
Function
check
Geometry/Half Plane Intersection.cpp:78
↓ 4 callers
Method
clear
Strings/Aho Corasick Dynamic.cpp:77
↓ 4 callers
Method
clear
Data Structures/Static to Dynamic Trick.cpp:24
↓ 4 callers
Function
connect
Geometry/Voronoi Diagram.cpp:53
↓ 4 callers
Function
connect
Geometry/Delaunay Triangulation.cpp:54
↓ 4 callers
Method
count
Miscellaneous/Bitset Custom.cpp:47
↓ 4 callers
Function
cross
Geometry/Onion Decomposition.cpp:15
↓ 4 callers
Function
cross2
Geometry/All Pair Segment Intersection.cpp:78
↓ 4 callers
Method
del
Data Structures/MOs Online.cpp:15
↓ 4 callers
Function
dfs
Miscellaneous/Maximum of Sum of All Pair Distances of K nodes in a Tree.cpp:128
↓ 4 callers
Function
dfs
Graph Theory/Long Path Decomposition.cpp:88
↓ 4 callers
Function
dijkstra
Graph Theory/Dijkstra.cpp:8
↓ 4 callers
Method
do_subtree_increment
Data Structures/Top Tree.cpp:46
↓ 4 callers
Function
dot
Geometry/Half Plane Intersection Dynamic.cpp:33
↓ 4 callers
Function
eval
Math/Finite Field Arithmetic Binary.cpp:34
↓ 4 callers
Function
f
Math/Integration (Romberg).cpp:8
↓ 4 callers
Function
fft
Math/NTT With Any Prime MOD.cpp:34
↓ 4 callers
Function
fft
Math/Polynomial.cpp:34
↓ 4 callers
Function
fft
Math/Subset Sum Problem.cpp:34
↓ 4 callers
Function
fft
Math/Faulhaber Formula Fastest.cpp:34
↓ 4 callers
Function
fft
Math/Linear Recurrence Fastest.cpp:34
↓ 4 callers
Function
fft
Math/Lagrange Interpolation with Polynomial Extraction.cpp:34
↓ 4 callers
Function
fft
Math/Polynomial with Binomial Coefficients.cpp:34
↓ 4 callers
Function
fft
Math/NTT Online (D&C).cpp:34
↓ 4 callers
Function
fft
Number Theory/Bell Number.cpp:34
↓ 4 callers
Function
fft
Number Theory/Stirling Number of the Second Kind for Fixed k.cpp:34
↓ 4 callers
Function
fft
Number Theory/Sum of C(a(i), k) for each k from 1 to n.cpp:34
↓ 4 callers
Function
fib
Number Theory/Pisano Period.cpp:102
↓ 4 callers
Function
format
Miscellaneous/Negative Base (Binary).cpp:28
↓ 4 callers
Function
get
Data Structures/MOs Online.cpp:52
↓ 4 callers
Function
getCommonPath
returns (0,0) for null path
Graph Theory/Path Intersection.cpp:36
↓ 4 callers
Method
get_val
get the ith value of the rth array
Data Structures/Persistent UnionFind.cpp:30
↓ 4 callers
Function
half
Geometry/Geometry 2D.cpp:61
↓ 4 callers
Function
init
nvars = number of variables, f = objective function, flag = MINIMIZE or MAXIMIZE
Math/Simplex Algorithm.cpp:85
↓ 4 callers
Method
init
Strings/Number of Palindromes in Range.cpp:54
↓ 4 callers
Method
insert
Miscellaneous/Maximum of Sum of All Pair Distances of K nodes in a Tree.cpp:91
↓ 4 callers
Method
inv
Math/q Binomial.cpp:61
↓ 4 callers
Method
inv
Math/Polynomial.cpp:142
↓ 4 callers
Method
inv
Math/Generating Function of a Linear Recurrence.cpp:26
↓ 4 callers
Method
inv
Number Theory/Phi Field.cpp:53
↓ 4 callers
Function
inverse
Number Theory/Discrete Root Faster.cpp:18
↓ 4 callers
Function
is_root
Strings/Suffix Automaton Distinct Substring Queries in Range.cpp:116
↓ 4 callers
Method
is_zero
Beware!! p[i] = k won't change the value of p.a[i]
Math/Polynomial.cpp:165
↓ 4 callers
Function
isanc
if g is an ancestor of u
Graph Theory/Path Intersection.cpp:31
↓ 4 callers
Function
lattice_cnt
number of integer solutions to ax + by <= c s.t. x, y >= 0
Number Theory/Number of ax%p in a Range.cpp:7
↓ 4 callers
Function
lca
Graph Theory/Path Intersection.cpp:19
↓ 4 callers
Function
lca
Graph Theory/LCA.cpp:18
↓ 4 callers
Function
length
Data Structures/Permutation Tree.cpp:77
↓ 4 callers
Method
make_root
Data Structures/Top Tree.cpp:402
↓ 4 callers
Function
merge
Given two valid paths in a tree it finds the union of two paths. If the union is not a path it //returns {-1,-1};
Graph Theory/Path Union.cpp:34
↓ 4 callers
Function
mod_count
returns the number of 0 <= (a * x % m) <= c s.t. 0 <= x <= n
Number Theory/Number of ax%p in a Range.cpp:32
↓ 4 callers
Function
mod_inv
Math/Linear Recurrence With Polynomial Coefficients.cpp:10
↓ 4 callers
Method
ncr
Number Theory/Prefix Sum Queries of nCi.cpp:48
↓ 4 callers
Function
negate_number
return -s
Miscellaneous/Negative Base (Binary).cpp:61
↓ 4 callers
Method
norm2
Geometry/Delaunay Triangulation.cpp:16
↓ 4 callers
Function
ori
Geometry/Voronoi Diagram.cpp:228
↓ 4 callers
Function
out
Strings/Number of Palindromes in Range.cpp:158
↓ 4 callers
Function
point_on_sphere_segment
Assume that the sphere is centered at the origin
Geometry/Geometry 3D.cpp:589
↓ 4 callers
Method
pow
Number Theory/Bell Number.cpp:114
↓ 4 callers
Method
pow
Number Theory/Stirling Number of the Second Kind for Fixed k.cpp:114
↓ 4 callers
Function
power
Number Theory/Discrete Root.cpp:4
↓ 4 callers
Function
power
Number Theory/K Divisors.cpp:82
↓ 4 callers
Function
power
Number Theory/Generalized Floor Sum of Arithmetic Progressions.cpp:7
↓ 4 callers
Function
power
Number Theory/Sum of Arithmetic Progression Powers Divided.cpp:6
↓ 4 callers
Function
power
Number Theory/Sqrt Decomposition of Mod of Arithmetic Progression.cpp:7
↓ 4 callers
Function
prec
Strings/String Hashing.cpp:22
↓ 4 callers
Function
priority
Miscellaneous/Expression Parsing.cpp:16
↓ 4 callers
Function
project_from_point_to_seg
minimum distance point from point c to segment ab that lies on segment ab
Geometry/Voronoi Diagram.cpp:172
↓ 4 callers
Function
push
Strings/Suffix Automaton Distinct Substring Queries in Range.cpp:105
↓ 4 callers
Function
q_perm
[n]! / [n - r]!
Math/q Binomial.cpp:111
↓ 4 callers
Function
query
Graph Theory/Manhattan MST.cpp:28
↓ 4 callers
Method
revert
Graph Theory/Dynamic MST Offline.cpp:29
← previous
next →
201–300 of 3,514, ranked by callers