C ++ Primer Learning Notes (6) - Abstract Container Type

xiaoxiao2021-03-06  18

Chapter 6: Abstract Container Types

1: In this chapter, it is primarily introduced by introducing a text query system to the order of sequential container vectors, List, and associated container MAP, SET. This chapter can learn from the books of the data structure. The implementation of the process army can see on the data structure book, we can implement it by simple C language.

Personally feel: This chapter is not too big in the future. (Maybe I am still in touch with it)

2: The sequential container refers to: a ordered collection of single type elements (with the queue of the data structure, the stack concept is very similar. Sequential container contains List and Vector, and double-end queue Deque.

C program --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------- Data Structure List Bidirectional Link Picture VECTOR (One - dimensional array implementation) Stack or queue Deque (two-dimensional array implementation) Cross table

3: The associated container supports querying whether an element is present and can effectively obtain an element. Two basic associated container types are MAP mapping and SET collection. Map is a key / value (key) for query, and the value (value) contains the data we want to use. The SET contains a single key value that effectively supports queries about whether or not elements are. Map and SET include only the only appearance of each key, that is, each button is only allowed; MultiMap multi-map and multiset multi-collection supports multiple appearances of the same key.

转载请注明原文地址:https://www.9cbs.com/read-48301.html

New Post(0)