MindMap Gallery Data structure implementation basics
A mind map of the basics of data structure implementation. The basics of data storage include constructing complex data types, type definitions, and linked lists.
Edited at 2023-06-02 20:30:32One Hundred Years of Solitude is the masterpiece of Gabriel Garcia Marquez. Reading this book begins with making sense of the characters' relationships, which are centered on the Buendía family and tells the story of the family's prosperity and decline, internal relationships and political struggles, self-mixing and rebirth over the course of a hundred years.
One Hundred Years of Solitude is the masterpiece of Gabriel Garcia Marquez. Reading this book begins with making sense of the characters' relationships, which are centered on the Buendía family and tells the story of the family's prosperity and decline, internal relationships and political struggles, self-mixing and rebirth over the course of a hundred years.
Project management is the process of applying specialized knowledge, skills, tools, and methods to project activities so that the project can achieve or exceed the set needs and expectations within the constraints of limited resources. This diagram provides a comprehensive overview of the 8 components of the project management process and can be used as a generic template for direct application.
One Hundred Years of Solitude is the masterpiece of Gabriel Garcia Marquez. Reading this book begins with making sense of the characters' relationships, which are centered on the Buendía family and tells the story of the family's prosperity and decline, internal relationships and political struggles, self-mixing and rebirth over the course of a hundred years.
One Hundred Years of Solitude is the masterpiece of Gabriel Garcia Marquez. Reading this book begins with making sense of the characters' relationships, which are centered on the Buendía family and tells the story of the family's prosperity and decline, internal relationships and political struggles, self-mixing and rebirth over the course of a hundred years.
Project management is the process of applying specialized knowledge, skills, tools, and methods to project activities so that the project can achieve or exceed the set needs and expectations within the constraints of limited resources. This diagram provides a comprehensive overview of the 8 components of the project management process and can be used as a generic template for direct application.
Data structure implementation basics
Data storage basics
Construct complex data types
array
An ordered collection of data of the same type
Sequential structure, the elements in the array are stored continuously in the memory, and the array elements can be uniquely determined by using the array name and subscript.
The general form of the definition of a one-dimensional array: type name array name [array length] The definition form of a two-dimensional array: type name array name [row length] [column length]
structure
The general form of structure type definition: struct structure name {type name structure member 1;};
Structure variable usage format: structure variable name.structure member name
Structure array: Format: result array name [subscript].structure member name
structure pointer
1. Use * method to access, in the form: (*structure pointer variable name).structure member name
2 Use the pointer operator to access the structure member pointed to by the pointer, in the form: structure pointer variable name -> structure member name
community
Definition form union union {type name member name n;}
pointer
The general form of defining pointer variables: type name * pointer variable name
Using pointers to implement memory dynamics
1. Allocation: malloc
2. Release: free
typedef typedef
typedef original type name new type name
linked list
Definition: There are several "nodes" of the same structure type connected in sequence, that is, each node stores the address (pointer) of the next node.
Type: One-way linked list, doubly linked list, circular list
Common operations on one-way lists
1. Insert node
2. Delete nodes
3. Traversal of one-way linked list
4. Creation of linked list
Process control basics
Three basic control structures: sequence, branch, and loop
branch control
if-else
Switch
loop control
for
while
do-while (the loop body will be executed at least once)
Functions and recursion
Format: function name (actual parameters)
Actual parameters: can be constants, variables and expressions (address changes)
Formal parameter: must be a variable (value changes)
Recursive function: calls its own function directly or indirectly