wrote and compiled hpsort.c for heapsort