data structure
Linear table Insert q node after p node in
single linked list q->next = p-next; p->next = q; delete p node head->next = p->next; free§;
Circular linked list
Double linked list
Delete p node
p->next->front =p->front;
p->front->next=p->-next;
free§;
Insert q node after p node
q->next = p- > Next;
Q-> Front = P;
p-> next-> Q = Front;
p-> Next = Q;
sequential storage, chain stores performance comparison
stack
same stack sequence, the sequence may differ from the stack (the side Edge out)
pointer to the top of the stack
Queue
head and tail pointers
To judge whether the circular queue is empty or full
Sacrifice a space, (tail+1)% size=head% size, queue full
tail=head, queue empty