MindMap Gallery Data structure-3.1. Stack
This is an article about data structure-3.1. Stack mind map, which only allows insertion and deletion of linear tables at one end, first in, last out FILO.
Edited at 2023-11-27 15:48:38Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
StackStack
Definition: A linear table that only allows insertion and deletion at one end, first in, last out FILO
Properties: n elements are pushed onto the stack, and the number of different arrangements of elements popped out of the stack is (Catelan number)
storage structure
sequence stack
Basic operations
Create: S.top=-1
Pin: Since a static array is defined, the system automatically recycles it when the function call ends.
Increase: S.data[S.top]=x first move the pointer and then push it onto the stack
Delete: x=S.data[S.top--]
Check (read the top element of the stack): x=S.data[S.top]
How to judge short/full? :S.top==-1/S.top==MaxSize-1
chain stack
Stack stored in a chained manner
Method to realize
Leading node
No leading node (recommended)
In and out of the stack are performed at the head of the linked list.
Advantages: There is no stack overflow, and it is convenient for multiple stacks to share space
shared stack
S.top0==-1; S.data[ S.top]=x Push from the bottom of the stack to the top of the stack
S.top1=MaxSize;x=S.data[--S.top] Push from the top to the bottom of the stack
Full sentence: top0 1==top1