MCPcopy Create free account

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

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

Methodgcd
Miscellaneous/BigInt.cpp:457
Functiongeometric_median
it returns a point such that the sum of distances from that point to all points in p is minimum O(n log^2 MX)
Geometry/Geometry 2D.cpp:603
Methodget
Strings/Aho Corasick.cpp:21
Methodget
Graph Theory/Long Path Decomposition.cpp:63
MethodgetC
Graph Theory/Hungarian Algorithm.cpp:27
MethodgetFlow
Graph Theory/Min Cost Max Flow with Negative Cycles.cpp:162
Methodget_abc
ax + by + c = 0
Geometry/Geometry 2D.cpp:107
Functionget_angle
Geometry/Voronoi Diagram.cpp:154
Functionget_angle
Geometry/Geometry 2D.cpp:52
Functionget_angle
Geometry/Half Plane Intersection.cpp:46
Functionget_angle
Geometry/Half Plane Intersection Dynamic.cpp:46
Functionget_angle
Geometry/All Pair Segment Intersection.cpp:108
Functionget_apollonius_circle
returns the circle such that for all points w on the circumference of the circle dist(w, a) : dist(w, b) = rp : rq rp != rq https://en.wikipedia.org/w
Geometry/Geometry 2D.cpp:396
Functionget_circle
returns two circle c1, c2 through points a, b and of radius r 0 if there is no such circle, 1 if one circle, 2 if two circle
Geometry/Geometry 2D.cpp:356
Methodget_count
Strings/Aho Corasick Dynamic.cpp:60
Functionget_direction
0 if cw, 1 if ccw
Geometry/Geometry 2D.cpp:594
Methodget_hash
Strings/String Hashing With Updates and Reverse.cpp:91
Methodget_lca
Graph Theory/Blossom Algorithm Weighted.cpp:77
Methodget_lcp
Strings/Suffix Array Isomorphic.cpp:176
Methodget_lcp
Strings/Suffix Array.cpp:140
Methodget_lcp_brute
Strings/Suffix Array Isomorphic.cpp:138
Methodget_max
Data Structures/Trie.cpp:42
Functionget_maximum_polygon_area_for_given_lengths
given a list of lengths of the sides of a polygon in counterclockwise order returns the maximum area of a non-degenerate polygon that can be formed us
Geometry/Geometry 2D.cpp:1292
Methodget_min
Data Structures/Trie.cpp:52
Methodget_next
Geometry/Half Plane Intersection Dynamic.cpp:87
Methodget_parent
parent of u in the rep. tree
Data Structures/Link Cut Tree.cpp:122
Methodget_path
Data Structures/Top Tree.cpp:457
Methodget_points
Geometry/Geometry 2D.cpp:90
Methodget_pr
Graph Theory/Blossom Algorithm Weighted.cpp:54
Methodget_prev
Geometry/Half Plane Intersection Dynamic.cpp:88
Methodget_size
Miscellaneous/Matroid Intersection Color Graphic Matroid.cpp:31
Methodget_size
Data Structures/Persistent UnionFind.cpp:88
Methodget_size
Data Structures/DSU.cpp:18
Methodget_size
Graph Theory/Boruvka's Algorithm.cpp:50
Methodget_size
Graph Theory/Krushkal's MST.cpp:13
Methodget_size
Graph Theory/Kirchoffs Theorem.cpp:59
Methodget_size
Graph Theory/Gomory Hu Tree.cpp:114
Functionget_sphere
https://desktop.arcgis.com/en/arcmap/10.7/map/projections/geographic-coordinate-system.htm given the radius of the sphere, latitude and longitude of a
Geometry/Geometry 3D.cpp:551
Methodget_subtree
Data Structures/Top Tree.cpp:469
Methodget_two_points_on_plane
Geometry/Geometry 3D.cpp:118
Methodget_val
returns value of index pos
Data Structures/Implicit Treap.cpp:332
Methodgetarea
Geometry/Geometry 2D.cpp:486
Functiongo
kth node from u to v, 0th node is u
Data Structures/LCA.cpp:35
Methodgo
Strings/Aho Corasick All Pair Occurrence Relation.cpp:46
Methodgo
Graph Theory/Edge Coloring Bipartite Graph Faster.cpp:38
Functiongreat_circle_dist
The shortest distance between two points A and B on a sphere (O, r) is given by travelling along plane OAB and on the surface of the sphere. It is cal
Geometry/Geometry 3D.cpp:566
Methodheap
Data Structures/Persistent Meldable Heap.cpp:15
Methodheap
Graph Theory/Eppsteins Algorithm.cpp:16
Methodheight
height of the cap (just like real world cap)
Geometry/Geometry 3D.cpp:679
Methodheight
Geometry/Geometry 3D.cpp:791
Methodilog2
Number Theory/Sum of nCi for a Fixed Large n.cpp:239
Methodimag
Miscellaneous/BigInt.cpp:36
Methodin_group
Miscellaneous/Schreier–Sims algorithm.cpp:47
Methodinit
Geometry/Geometry 2D.cpp:478
Methodinit
Geometry/Geometry 3D.cpp:379
Methodinit
Number Theory/Prime Factorization Fastest.cpp:10
Methodinit
Number Theory/Sum of nCi for a Fixed Large n.cpp:57
Methodinit
Graph Theory/Maximum Clique and Maximum Independent Set Super Fast.cpp:25
MethodinitBFS
Graph Theory/Hungarian Algorithm.cpp:30
Methodinorder
inorder traversal to get indexes chronologically
Data Structures/Implicit Treap.cpp:340
Functioninsert
insert x into the i-th index
Data Structures/Square Root Decomposition With Reverse Update.cpp:93
Methodinsert
Dynamic Programming Optimizations/Persistent CHT.cpp:17
Methodinsert
Data Structures/Static to Dynamic Trick.cpp:47
FunctionintToDate
Miscellaneous/Dates.cpp:8
FunctionintToDay
Miscellaneous/Dates.cpp:1
Methodintegrate
Number Theory/Stirling Number of the Second Kind for Fixed k.cpp:233
Methodinter
returns the intersection point of the line with plane p assuming plane and line are not parallel
Geometry/Geometry 3D.cpp:187
Functioninterpolate
O(nlog^2n)
Math/Polynomial.cpp:498
Methodinv
Math/Faulhaber Formula Fastest.cpp:122
Methodinv
Math/Polynomial Sum.cpp:19
Methodinv
Math/Lagrange Interpolation with Polynomial Extraction.cpp:123
Methodinv
Number Theory/Phi Field.cpp:20
Methodinv
Number Theory/Combinatorics Basics.cpp:18
Methodinv
Number Theory/Stirling Number of the Second Kind for Fixed k.cpp:142
Methodinv
Number Theory/Number of Solutions to a Basic Linear Algebraic Equation.cpp:19
Methodinv
Number Theory/Prefix Sum Queries of nCi.cpp:19
Methodinv
Number Theory/Lucas Theorem.cpp:20
Methodinverse
Math/Subset Sum Problem.cpp:210
Methodinverse
Number Theory/Bell Number.cpp:238
Functioninverse_mobius_transform
Dynamic Programming Optimizations/SOS convolutions.cpp:37
Functioninverse_zeta_transform
Dynamic Programming Optimizations/SOS convolutions.cpp:34
Methodis_bipartite
Data Structures/DSU with Rollbacks.cpp:108
Methodis_bipartite
Data Structures/Queue Undo Trick.cpp:120
Functionis_convex
checks if convex or not
Geometry/Geometry 2D.cpp:659
Functionis_negative
Miscellaneous/Negative Base (Binary).cpp:55
Methodis_palindrome
Strings/Manachers.cpp:24
Functionis_perpendicular
Geometry/Geometry 3D.cpp:211
Functionis_point_in_angle
Geometry/Voronoi Diagram.cpp:158
Functionis_point_in_angle
Geometry/Geometry 2D.cpp:56
Functionis_point_in_convex
-1 if strictly inside, 0 if on the polygon, 1 if strictly outside it must be strictly convex, otherwise make it strictly convex first
Geometry/Geometry 2D.cpp:672
Functionis_point_in_polygon
-1 if strictly inside, 0 if on the polygon, 1 if strictly outside
Geometry/Geometry 2D.cpp:711
Methodis_root
Data Structures/Link Cut Tree.cpp:155
Methodisleaf
Geometry/Onion Decomposition.cpp:31
Methodiwt
Math/FWHT.cpp:33
Functionjosephus
n = total person will kill every kth person, if k = 2, 2,4,6,... returns the mth killed person O(k log n)
Miscellaneous/Josephus Problem.cpp:5
Functionknight_move
Minimum number of knight moves from (x,y) to (0,0) in non-negative infinite chessboard
Miscellaneous/Knight Moves in Infinity Grid.cpp:4
Functionkth
Graph Theory/Virtual Tree.cpp:28
Methodkth
kth smallest element in [l, r] for array [1,2,1,3,5] 2nd smallest is 1 and 3rd smallest is 2
Strings/Number of Palindromes in Range.cpp:82
Functionkth_perm
returns the k-th lexicographically smallest permutation of size n 0-th permutation is the unit permutation i.e. 0, 1, 2, .... n-1
Number Theory/Factoradic Number System.cpp:40
Methodlazy_repl_upd
replace update
Data Structures/Implicit Treap.cpp:91
← previousnext →1,901–2,000 of 3,514, ranked by callers