Skip to main content

HeapSort

This subroutine implements heap sort algorithm to sort the array inplace.

Calling example:

CALL HeapSort(array)

Interface

  MODULE PURE SUBROUTINE HeapSort(array)
INTEGER(Int8| Int16 | Int32 | Int64) | REAL(Real32| Real64), INTENT(INOUT) :: array(:)
END SUBROUTINE HeapSort