Added Heap sort that does not copy the input array