Implement a function to perform heap sort on an array
HardProblem Statement
Implement a function to perform heap sort on an array
Sample Input
[12, 11, 13, 5, 6, 7]
Sample Output
[5, 6, 7, 11, 12, 13]
Limits
Time: 2s · Memory: 256 MB
Implement a function to perform heap sort on an array
[12, 11, 13, 5, 6, 7]
[5, 6, 7, 11, 12, 13]
Time: 2s · Memory: 256 MB