Common data Structures in STL

Source: Internet
Author: User

Common data Structures in STL:

[1] The default implementation of stack and queue in STL is deque structure.

[2] Deque: Using map to manage multiple sizes of contiguous blocks of memory, convenient for the tail insertion.

[3] Vector: variable-length dynamic array, each increase of 1.5 times times, delete the element does not free space.

[4] Priority_queue the lower level by default vectors vector O (nlogn).

[5] List: Two-way linked list container.

[6] Slist: Unidirectional linked list container.

[7] Bit_vector: A bit bit element of the sequence container, commonly used for hardware port control. The important feature that distinguishes vector<bool> is the space saving.

[8] The Set collection container, Multiset multiset containers are implemented using red-black trees, which allow the same elements.

[9] map, Multimap as a reflection of the container, the bottom of the red and black trees. The latter allows the same elements.

The Hash_set hash collection container/hash_map a hash-illuminated container with Hashtable.

[One] string basic character sequence container.

Common data Structures in STL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.