ЁЯУв Too many exams? DonтАЩt know which one suits you best? Book Your Free Expert ЁЯСЙ call Now!

  • google app store apple app store
  • тЬЦ

      Question

      The time complexity of building a heap from an unsorted

      array of n elements is:
      A O(n log n) Correct Answer Incorrect Answer
      B O(n┬▓) Correct Answer Incorrect Answer
      C O(n) Correct Answer Incorrect Answer
      D O(log n) Correct Answer Incorrect Answer
      E O(n тИЪn) Correct Answer Incorrect Answer

      Solution

      Bottom-up heapify builds a heap in linear time because lower levels require fewer comparisons.

      Practice Next
      More Algorithms Questions
      ask-question