1.

Sets are implemented using _______________________(a) binary search tree(b) red black tree(c) avl tree(d) heapThis question was addressed to me during an interview for a job.My enquiry is from More Containers in section Class Hierarchies, Library & Containers of C++

Answer»

The correct answer is (a) binary search tree

Explanation: Sets are implemented USING the search tree so that we can CHECK the presence of any element to be INSERTED in O(logn) time in order to REMOVE conflicts between elements.



Discussion

No Comment Found

Related InterviewSolutions