Day 128 Learning Record: Data Structure and Algorithm Basics: Stacks and Queues (Part 1) (Wang Zhuo Teaching Video)

Definition and characteristics of stack and queue

1. Stacks and queues are two commonly used and important data structures.
2. Stacks and queues are linear tables that limit insertion and deletion to the "end points" of the table. Linear tables
insert image description here
can be inserted and deleted at any position, and stacks can only Can insert and delete at the last position
insert image description here
insert image description here
insert image description here

queue

Only the first element can be deleted.
insert image description here
insert image description here
insert image description here
Stacks and queues are subsets of linear lists (linear lists with limited insertion and deletion positions)

The definition and characteristics of the stack

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

Queue definition and characteristics

insert image description here
insert image description here
insert image description here

The case for stacks and queues

insert image description here
insert image description here
insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/weixin_45694614/article/details/132265333