Containers

Containers are used to store and manage collections of objects. They provide various ways to organize and access data, and they come with built-in functionalities for manipulation; It contains 4 types of containers:

  1. Sequence Container:

    Such as vector, list, deque; which stores element in sequential order.

  2. Associative Container:

    Such as set, map, multiset, multimap, hash_set, hash_map, hash_multiset, hash_multimap; which stores element in such way that allows fast retrieval based on key.

  3. Unordered Associative Container:

    Such as unordered_set, unoedered_map; which provide average constant time complexity.

  4. Container Adaptors:

    Such as stack , queue, and priority_queue; which provide specific interface to oher container.

Last updated