Google News
logo
CPP - Quiz(MCQ)
What is the use of C++ sort_heap() function in heap?
A)
To sort the elements in the heap into ascending order
B)
To sort the first half of the heap
C)
To sort the second half of the heap
D)
To sort the elements in the heap into descending order

Correct Answer :   To sort the elements in the heap into ascending order


Explanation : C++ STL-heap container provides sort_heap() function to sort the heap into ascending order which will no longer remain a heap.

Advertisement