Data structure algorithm part

Sequence table

Insert image description here
Insert image description here
Insert image description here

linked list

Insert image description here
Single linked list head interpolation
Insert image description here
tail interpolation
Insert image description here
Single linked list query by value
Insert image description here
Single linked list deletion by value
Insert image description here
Single linked list printing
Insert image description here
The output format corresponds to the meaning of the data type symbol
%d int outputs a signed decimal int type
%o unsigned int outputs octal The int type
%x unsigned int outputs the decimal int type, and the letters are output in lowercase
%X unsigned int outputs the decimal int type, and the letters are output in uppercase
%u unsigned int outputs a decimal unsigned integer
printf ("Format control string", output table item);
scanf ("Format control string", input item address list);
Insert image description here
Insert image description here

stack

Insert image description here
Push into the
Insert image description here
stack, pop out of the stack
Insert image description here
, print the sequence stack,
Insert image description here
chain stack,
Insert image description here
push into the stack, pop
Insert image description here
out of the stack.
Insert image description here
Insert image description here

queue

Circular queue
Insert image description here
Circular queue enqueuing Circular queue
Insert image description here
dequeuing Circular queue
Insert image description here
printing
Insert image description here
How to write the main function
Insert image description here
Chain queue Chain queue
Insert image description here
enqueuing Chain
Insert image description here
team dequeuing
Insert image description here
Chain queue printing
Insert image description here
Insert image description here

Tree

Definition of tree
Insert image description here
Tree creation
Insert image description here
Recursive traversal of
Insert image description here
tree Non-recursive traversal of
Insert image description here
tree Hierarchical traversal of tree
Insert image description here

picture

Storage adjacency matrix of graph
Insert image description here
Storage adjacency list of graph
Insert image description here
Insert image description here
Convert adjacency matrix to adjacency list
Insert image description here
Depth-first traversal of adjacency list
Insert image description here
Breadth-first traversal of adjacency list
Insert image description here
Floyd's algorithm to find the shortest path
Insert image description here
Implement topological sorting of adjacency list
Omitted

sort

Bubble Sort
Insert image description here

Selection sort
Insert image description here
Insertion sort
Insert image description here
Hill sort
Insert image description here
Quick sort Heap
Insert image description here
sort
Insert image description here
Merge sort
Insert image description here
Bucket sort
Insert image description here
Counting sort
Radix sort
Omitted

Guess you like

Origin blog.csdn.net/wangjunlei666/article/details/125511661