big o construct heap code example
Example: Big o heap sort
Data structure: Array
Worst-case performance: O(nlog n)
Best-case performance : O(nlog n) (distinct keys) O(n) (equal keys)
Average performance: O(nlog n)
Worst-case space complexity: O(n) total O(1) auxiliary