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

Method build

Data Structures/Persistent Array.cpp:11–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9 int n = 1;
10 vector<node*> root;
11 int build(vector<T> v) {
12 while (n < v.size()) n <<= 1;
13 root.push_back(build(0, n - 1, v));
14 return root.size() - 1;
15 }
16 node* build(int l, int r, vector<T>& v) {
17 node* cur = new node();
18 if (l == r) {

Callers 1

PersistentQueueMethod · 0.45

Calls 3

push_backMethod · 0.80
buildFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected