code: public static void partialSortUsingHeap(Quicksortable q, int k, int size) {
          Quicksortable revq = reverseQuicksortable(q);
          makeHeap(revq, k);
          for (int i = k; i < size; i++) {
              if (q.compare(0, i) > 0) {
                  q.swap(0, i);
                  heapifyDown(revq, 0, k);
              }
          }
          sortheap(revq, k);
      }
docs: finds the lowest k elements of q and stores them in sorted order
  at the beginning of q by using a heap of size k
  
  @param q The quicksortable to heapsort.
  @param k The number of elements to sort at the beginning of the
  quicksortable.
  @param size The size of the quicksortable.