A Basic Quiz on Algorithms #1

  • + 2 comments

    Which of these is the time complexity involved in building a heap of n elements - and cannot be expressed in lower order terms ? How come the answer is not o(nlogn)? If you are talking about heap then it must be min heap or max heap.Max/Min heapify takes o(log(n)).So it should be o(nlogn).Please let me know if i am missing something.