Save
COMPUTER PROGRAMMING 2
UNIT 4.
Lesson 4.1
Save
Share
Learn
Content
Leaderboard
Learn
Created by
CHRISTINE JOY
Visit profile
Cards (8)
Associative containers
Set
: Collection of unique keys, sorted by keys
Map
: Collection of key-value pairs, sorted by keys, keys are unique
multiset
: Collection of keys, sorted by keys
multimap
: Collection of key-value pairs, sorted by keys
Sequence containers
array
vector
deque
forward
_
list
list
Container adapters
stack
: Adapts a container to provide stack (LIFO data structure)
queue
: Adapts a container to provide queue (FIFO data structure)
priority_queue
: Adapts a container to provide priority queue
Container
Manages
storage space
for its
elements
Provides member functions to access elements
, either directly or
through iterators
Sequence containers
Data structures
that can be accessed
sequentially
Container
1.
Holder
object that stores a collection of other objects (its elements)
2. Implemented as
class templates
, allowing flexibility in the types supported as elements
Container adapters
Provide a different interface for sequential containers
Associative containers
Sorted data structures that can be quickly searched (O(
log n
) complexity)