MindMap Gallery Data Structures and Algorithms Linear Tables
Data structure and algorithm linear table study notes, suitable for reference for preview and review. It is suitable for review before exams and can also be used in combination with other materials.
Edited at 2022-12-04 20:07:12This infographic, created using EdrawMax, outlines the pivotal moments in African American history from 1619 to the present. It highlights significant events such as emancipation, key civil rights legislation, and notable achievements that have shaped the social and political landscape. The timeline serves as a visual representation of the struggle for equality and justice, emphasizing the resilience and contributions of African Americans throughout history.
This infographic, designed with EdrawMax, presents a detailed timeline of the evolution of voting rights and citizenship in the U.S. from 1870 to the present. It highlights key legislative milestones, court decisions, and societal changes that have expanded or challenged voting access. The timeline underscores the ongoing struggle for equality and the continuous efforts to secure voting rights for all citizens, reflecting the dynamic nature of democracy in America.
This infographic, created using EdrawMax, highlights the rich cultural heritage and outstanding contributions of African Americans. It covers key areas such as STEM innovations, literature and thought, global influence of music and arts, and historical preservation. The document showcases influential figures and institutions that have played pivotal roles in shaping science, medicine, literature, and public memory, underscoring the integral role of African American contributions to society.
This infographic, created using EdrawMax, outlines the pivotal moments in African American history from 1619 to the present. It highlights significant events such as emancipation, key civil rights legislation, and notable achievements that have shaped the social and political landscape. The timeline serves as a visual representation of the struggle for equality and justice, emphasizing the resilience and contributions of African Americans throughout history.
This infographic, designed with EdrawMax, presents a detailed timeline of the evolution of voting rights and citizenship in the U.S. from 1870 to the present. It highlights key legislative milestones, court decisions, and societal changes that have expanded or challenged voting access. The timeline underscores the ongoing struggle for equality and the continuous efforts to secure voting rights for all citizens, reflecting the dynamic nature of democracy in America.
This infographic, created using EdrawMax, highlights the rich cultural heritage and outstanding contributions of African Americans. It covers key areas such as STEM innovations, literature and thought, global influence of music and arts, and historical preservation. The document showcases influential figures and institutions that have played pivotal roles in shaping science, medicine, literature, and public memory, underscoring the integral role of African American contributions to society.
linear table
basic concept
definition
A linear table is a finite sequence composed of n (n>=0) data elements of the same type. A data element can be composed of several data objects, and the data elements in a linear table must belong to the same data object.
Linear represents a finite sequence of n data elements of the same type. For n>0, except that the first element has no direct predecessor and the last element has no direct successor, each of the remaining data elements has only one direct predecessor and direct successor.
logical structure
nature
Identity
A linear table consists of homogeneous data elements, and each element must be of the same data type.
Finiteness
A linear table consists of a limited number of data elements, and the table length is the number of data elements in the table.
There is an ordinal relationship between adjacent data elements in a linear table.
The storage structure of linear table
The storage structure of linear table
Sequential storage structure: sequence table
Linked storage structure: linked list
sequence list, linked list
Sequence table
Definition: Use a set of consecutive storage units with addresses to store data elements of a linear table in sequence.
Features
The first element storage location is the starting point of the linear list
The storage location of the ith element is immediately after the storage location of the ith element.
Basic operations
Find
insert
delete
linked list
Contents of each node
Information about the stored element
Logical relationship information between elements
category
Doubly linked list
Circular singly linked list
Single list
eg: The predecessor node in a singly linked list contains the address information of the successor node.
Comparison of sequential storage and chained storage
Sequence table
Can be accessed randomly
Occupies storage space continuously
Insertion and deletion of sequence tables requires moving multiple elements
linked list
Contents of each node
stored element information
Logical relationship information between elements
Insertion and deletion of linked lists does not require moving multiple elements
Storage space is not necessarily contiguous
Occupies additional storage space to store relationships between elements, resulting in lower space utilization
eg: The predecessor node in a singly linked list contains the address information of the successor node.
time based
Sequence table
Because sequential tables are usually represented by arrays, which determine that sequential tables can be stored randomly, sequential tables should be used when the operations of linear tables are mainly search operations and few insertion and deletion operations.
linked list
Contrary to the situation of sequential tables, linear lists that require frequent insertion or deletion operations should use linked lists.
space based
storage density
Refers to the ratio of the storage amount occupied by the node data itself to the storage amount occupied by the entire node structure.
The sequence list is statically allocated, and the linked list is dynamically allocated.
When the length of the linear table does not change much and it is easy to determine its storage size in advance, a sequential table should be used, otherwise a linked list should be used.