Heap implementation seems ok, quicksort has a bug.