parameterize `IntervalHeap` with a comparator
parameterize `TreeMap` and `TreeSet` with a comparator