Lecture Algorithm for thai language Heapsort Class Sorting algorithm Data structure Array Worst-case performance O(n\log n) Best-case performance O(n\log n) Average performance O(n\log n) Worst-case space complexity O(1) auxiliary