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

Method push

Data Structures/Persistent Array.cpp:73–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 cur++;
72 }
73 void push(int r, T x) { // push x at the end of the rth queue
74 st.upd(r, R[r], x);
75 L[cur] = L[r];
76 R[cur] = R[r] + 1;
77 cur++;
78 }
79 T pop(int r) { // pops the top element of the rth queue and returns the popped element
80 st.upd(r, L[r], 0);
81 L[cur] = L[r] + 1;

Callers 1

mainFunction · 0.45

Calls 1

updMethod · 0.45

Tested by

no test coverage detected