[C] Data Structure-Definition of discrete storage linked list, Discrete Data Structure

Source: Internet
Author: User

[C] Data Structure-Definition of discrete storage linked list, Discrete Data Structure

Discrete storage [linked list]

1. Definition:

N nodes are discretely allocated and connected to each other through pointers.

Each node has only one parent node.

Only one subsequent Node

The first node does not have a precursor node, and the last node does not have a subsequent Node

 

2. Terminology:

First node: the first valid node

Tail node: The last valid node.

Header node: it does not store valid data and is easy to operate. The data type of the header node is the same as that of the first node.

Header pointer: pointer variable pointing to the header Node

Tail pointer: pointer variable pointing to the tail Node

3. Several parameters are required to determine a linked list:

Only one parameter is required: the header pointer, which can be used to calculate all other information of the linked list.

 

4. The data types of each node should at least include

A valid data

A pointer variable pointing to the next node

 

5. Category

Single-chain table: Has a pointer Field

Double-linked table: each node has two pointer fields.

Cyclic linked list: connects to a circle, and any node can find other nodes.

Non-circular linked list

 

Related Article

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.