PA of Algorithms Q103

0. The number of elements that can be stored in Θ(log n) time using heap sort is

  • Option : C
  • Explanation :
    Let the number of element is “K”, they can be sorted in Θ(k log k) time.
    We try the options in decreasing order of complexity since, we need a tight band i.e. Θ

    So if K ∈ Θ(log n) time required for loop sort is.
    Θ(k log k) i.e.
    Θ(log n x log log n), But this is not in Θ(log n)
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *