Summary of C data structure linear table

Source: Internet
Author: User

1: Features of the list
1, linked list is a storage structure for storing linear tables
2, the node of the linked table is allocated according to the need to call the dynamic allocation memory function, so the list can be shortened with the need for elongation
Save memory in cases where the number of data stored on the waist is unknown.
3, the node of the linked list is logically continuous, but the memory of each node is usually discontinuous, and therefore cannot be accessed immediately,
You can only start node-by-node access from scratch.
2: Selection of the storage mode of linear table
Comparison of sequential tables and even expressed amounts
Spatial aspect: A: When the table is difficult to estimate the size, select the chain storage B: When the table length is shorter, select the sequential storage
Time aspect: A: when inserting and deleting more, select chain Storage B: When looking for more, use sequential storage
Language: When the language does not have a pointer, choose the chain storage to choose the static list (static linked list requires pre-set space)
3: Single linked list and double linked list
But even expressions are inserted and removed (lead nodes, lead pointers)

Summary of C data structure linear table

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.