What is the {best|average|worst}-case time for Heapsort to sort an array of n records that each have unique key values?

\Theta(n \log n)
  • \Theta(n)
  • \Theta(\log n)
  • \Theta(n^2)
  • \Theta(n^n)

Does Heapsort's number of comparisons depend on the particular order of the input array?

Only a little bit, Heapsort still does basically the same work regardless of input data order.