void insert(Heap h, Item it) { assert(h->nitems < h->nslots); h->nitems++; h->items[h->nitems] = it; fixUp(h->items, h->nitems); }