parameterize `IntervalHeap` with a comparator