l4--discrete storage [linked list]

Source: Internet
Author: User

Defined
    • n discrete distribution of nodes;
    • Connected to each other by pointers;
    • Each node has only one precursor node, and each node has only one subsequent node;
    • The first node has no precursor node, and the tail node has no subsequent nodes.

Professional terminology:

    • First node: First active node
    • Tail node: Last valid node
    • Head nodes: The data type of the head node is the same as the first nodes type, the node before the first active node, the head node does not hold valid data [can be convenient for the operation of the linked list]
    • Head pointer: Pointer variable pointing to the head node
    • Tail pointer: pointer variable pointing to tail node

If you want to work with a linked list through a function, which parameters the function needs to accept:

    • Only one parameter is needed: the head pointer
    • Because we can infer all the other information from the list by the head pointer.
    • Node Construction:
    • #include <stdio>struct  node{    int data;   data domain    struct Node * pnext;   pointer field }node *pnode//node equivalent to struct node  pnode equivalent to struct node *int Main (void) {    return0;}

Classification
    • Single linked list
    • Double tables: Each node has two pointer fields
    • Circular link list: All other nodes can be found through any one node
    • Non-circular linked list:
Algorithm
    • Traverse
    • Find
    • Empty
    • Destroyed
    • Request length
    • Sort
    • Delete a node

l4--discrete storage [linked list]

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.