What is the time complexity of Build Heap operation?
(Build Heap is used to build a max(or min) binary heap from a given array. Build Heap is used in Heap Sort as a first step for sorting.)
O(nLogn)
O(n^2)
O(n)
O(logn)
This question is part of this quiz :
Top MCQs on Heap Data Strcuture with Answers