MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / upd

Method upd

Data Structures/Persistent Array.cpp:38–41  ·  view source on GitHub ↗

update the ith value if the rth array by x and return the new root of the array

Source from the content-addressed store, hash-verified

36 }
37 // update the ith value if the rth array by x and return the new root of the array
38 int upd(int r, int i, T x) {
39 root.push_back(upd(root[r], i, x, 0, n - 1));
40 return root.size() - 1;
41 }
42 node* upd(node* pre, int i, T x, int l, int r) {
43 node* cur = new node();
44 if (l == r){

Callers 2

pushMethod · 0.45
popMethod · 0.45

Calls 3

push_backMethod · 0.80
updFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected