code: public static void partialHeapSort(Quicksortable q, int k, int size) {
          makeHeap(q, size);
          for (int i = 0; i < k; i++) {
              q.swap(0, size-i-1);
              heapifyDown(q, 0, size-i-1);
          }
          vecswap(q, 0, size-k, k);
          reverse(q, k);
      }
docs: finds the lowest k elements of q and stores them in sorted order
  at the beginning of q by turning q into a heap.
  
  @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.