heap_sort
Sort an array of numbers in place using the heap sort algorithm, guaranteeing O(n log n) time and returning the swap count.
Instructions
Sort numbers using the heap sort algorithm. Guaranteed O(n log n) in-place sorting with swap count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| array | Yes | Array of numbers to sort |