Each node in a doubly-linked list contains two pointer fields, a pointer field containing the memory address of its successor, and a memory address stored by a pointer to its domain precursor node.Description of the type describing the junction of
Title DescriptionEnter a binary lookup tree to convert the two-fork lookup tree into a sorted circular doubly linked list.Requires that no new nodes be created, only pointers are adjusted, and new storage space is not opened O (1)Problem
Introduction to three types of linked listsForgive my poor drawing ability, spent a long time finally decided to look for these three pictures from the Internet, because the circular linked list of curved arrows is difficult to display perfectly.The
1, in the allocation of space:Array is allocated in a contiguous data space, so in allocating space must determine the size, the list is a discontinuous dynamic space, through the pointer to practice the connection, so the length is variable;2.
Q: Why should I introduce the concept of a linked list? What is it that solves the problem?A: the array as a data storage structure has a certain flaw, in the unordered array, the search is inefficient, and in an ordered array, the insertion
1. Basic concepts of linked lists
Linked lists and arrays are a linear structure;
The array is a contiguous storage space;
The list space is not necessarily guaranteed to be continuous, and is temporarily allocated;
First, the purpose of the experiment
To consolidate the storage methods and related operations of the data structure of linear tables, learn to solve specific problems by using the relevant knowledge of linear tables for specific applications.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.