1.

Which container is best to keep the collection of distinct elements?(a) multimap(b) heap(c) set(d) queueThe question was asked during an interview.This question is from More Containers topic in section Class Hierarchies, Library & Containers of C++

Answer» CORRECT choice is (c) SET

Best explanation: C++ PROVIDES a set container to store a collection of DISTINCT ELEMENTS. This container behaves similar to mathematical sets.


Discussion

No Comment Found

Related InterviewSolutions