1.

Which function is used to construct heap from given sequence of numbers?(a) create_heap()(b) make_heap()(c) construct_heap()(d) start_heap()I have been asked this question in an internship interview.This question is from STL topic in chapter Class Hierarchies, Library & Containers of C++

Answer»

Right answer is (b) make_heap()

The EXPLANATION: C++ STL-heap CONTAINER provides make_heap() FUNCTION to convert a GIVEN range of number into heap.



Discussion

No Comment Found

Related InterviewSolutions