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

Method heap

code/data-structures/heap.cpp:25–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23 if (!cmp(m, i)) break;
24 swp(m, i), i = m; } }
25 heap(int init_len = 128)
26 : count(0), len(init_len), _cmp(Compare()) {
27 q = new int[len], loc = new int[len];
28 memset(loc, 255, len << 2); }
29 ~heap() { delete[] q; delete[] loc; }
30 void push(int n, bool fix = true) {
31 if (len == count || n >= len) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected