There is no sequential ordering of elements. Data is sorted while giving input. Supports direct access of elements using keys. Data is stored as a tree. They facilitate fast searching, insertion, and deletion. Not efficient for sorting and random access. Examples of associative containers are: Set, multiset, Map, and multimap. Set and multiset: Store multiple elements and provide functions to manipulate them using their keys. A set does not allow duplicate elements. But a multiset allows duplicate elements. They are defined in the header file <set>. Map and multimap: Stores the elements as pair of key and value.
The post What are associative containers in Programming appeared first on Coding Security.
What are associative containers in Programming
read more
Tidak ada komentar:
Posting Komentar