Common Data Structures in programming

Source: Internet
Author: User

1. List linked list -- fast Modification

2. Set set

3. array -- fast update

4. Map key-value pairs

========

Hash: array-and list-based hash

========

Queue: queue -- threads share resources (When resources in a serial thread are closed, the solution is to lock the shared resources.)

Priority queue

FIFO queue

Synchronous transfer queue-a large number of threads

Dual-end queue --------- dedicated task queue. If it is null, tasks at the end of other queues will be taken for execution (Work password extraction)

Working Model:

Producer-consumer model

Thread Pool Model

Map:

Segment locks to increase the concurrency, instead of locking the entire map

Set:

Copy at write time:

Data snapshots are read/write splitting. Read operations are not locked, while write operations are locked,With memory consistency, users do not need to synchronize on their own

Tree:

Quick data structure organization format, which facilitates retrieval and sorting operations

 

Common Data Structures in programming

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.