MCPcopy Create free account
hub / github.com/LFYSec/MScan / insert

Method insert

src/test/resources/dataflow/constprop/alias/MaxPQ.java:32–39  ·  view source on GitHub ↗
(int x)

Source from the content-addressed store, hash-verified

30 }
31
32 public void insert(int x) {
33 // double size of array if necessary
34 if (n == pq.length - 1) resize(2 * pq.length);
35
36 // add x, and percolate it up to maintain heap invariant
37 pq[++n] = x;
38 swim(n);
39 }
40
41 public int delMax() {
42 if (isEmpty())

Callers 1

mainMethod · 0.95

Calls 2

resizeMethod · 0.95
swimMethod · 0.95

Tested by

no test coverage detected