MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / insert

Function insert

code/data-structures/sqrt_decomposition.cpp:29–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27 T[i] = segment(vi(T[i].arr.begin(), T[i].arr.begin() + at));
28 return i + 1; }
29void insert(int at, int v) {
30 vi arr; arr.push_back(v);
31 T.insert(T.begin() + split(at), segment(arr)); }
32void erase(int at) {
33 int i = split(at); split(at + 1);
34 T.erase(T.begin() + i); }

Callers

nothing calls this directly

Calls 4

push_backMethod · 0.80
splitFunction · 0.70
segmentClass · 0.70
insertMethod · 0.45

Tested by

no test coverage detected