MCPcopy Create free account
hub / github.com/cp-algorithms/cp-algorithms / Vertex

Method Vertex

test/test_segment_tree.cpp:49–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 int sum;
48
49 Vertex(int val) : l(nullptr), r(nullptr), sum(val) {}
50 Vertex(Vertex *l, Vertex *r) : l(l), r(r), sum(0) {
51 if (l) sum += l->sum;
52 if (r) sum += r->sum;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected