InterviewSolution
Saved Bookmarks
| 1. |
What is the use of sort_heap() function in heap?(a) To sort the elements in the heap into descending order(b) To sort the elements in the heap into ascending order(c) To sort the first half of the heap(d) To sort the second half of the heap |
|
Answer» The correct answer is (b) To sort the elements in the heap into ascending order The explanation is: C++ STL-heap container provides sort_heap() function to sort the heap into ascending order which will no longer remain a heap. |
|