Data structures are often used in STL

Source: Internet
Author: User
Tags set set

Frequently used data structures in STL:

[1] Stack, queue default for the underlying implementation of the 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. Increases 1.5 times times each time and does not free up space when the element is deleted.

[4] priority_queue the bottom layer by default 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, often used in hardware port control. The difference between vector<bool> important features is space saving.

[8] Set set container, Multiset multi-collection container is implemented with red black tree, the latter agree with the same element.

[9] Map, Multimap is a reflection container. The bottom is a red-black tree. The latter agrees with the same element.

[Ten] hash_set hash collection container/hash_map hash mapping container is used Hashtable.

[One] string basic character sequence container.

Data structures are often used 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.