ExamVeda
Login
Home
21
Which algorithm in C++ STL is used to find the first occurrence of a value in a range?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
22
What is the time complexity of removing an element from a list in C++ STL?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
23
What is the purpose of the 'std::stack' container adapter in C++ STL?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
24
Which algorithm in C++ STL is used to find the last occurrence of a value in a range?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
25
What is the time complexity of searching for an element in a map in C++ STL?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
26
What is the purpose of the 'std::multiset' container in C++ STL?
Discuss
Answer & Solution
Answer: Option A
Solution:
The purpose of the 'std::multiset' container in C++ STL is to store multiple elements in sorted order.

Unlike a std::set, which only stores unique elements, a std::multiset allows multiple occurrences of the same element.

The elements in a std::multiset are always sorted according to a specified sorting criterion, which is by default the operator<.

This makes std::multiset useful when you need to maintain a collection of sorted elements with duplicates allowed.
27
Which algorithm in C++ STL is used to find the union of two sorted ranges?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
28
What is the purpose of the 'std::queue' container adapter in C++ STL?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
29
What is the time complexity of removing an element from a priority queue in C++ STL?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
30
Which algorithm in C++ STL is used to find the intersection of two sorted ranges?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board