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

Method swp

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

Source from the content-addressed store, hash-verified

9 Compare _cmp;
10 inline bool cmp(int i, int j) { return _cmp(q[i], q[j]); }
11 inline void swp(int i, int j) {
12 SWP(q[i], q[j]), SWP(loc[q[i]], loc[q[j]]); }
13 void swim(int i) {
14 while (i > 0) {
15 int p = (i - 1) / 2;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected