1:stack(#include<stack>)
size (): returns the number of elements in the stack
top (): Returns the top of the stack elements
pop (): Remove and remove elements from the stack
push (e): e add elements to the stack
empty (): returns true when the stack is empty
{
Handwriting stack
}
2:vector(#include<vector>)
push_back (): at the end of the vector insert elements
Remove elements at the end of the vector: () pop_back
size (): Get the number of elements in a vector
empty (): determines whether the empty vector
clear (): Empty vector element
The vector a = b b copied into a vector
Comparison: holding ==, =,>,> =, <, <= customary meaning;!
Such as: a == b; // a comparative vector and vector b are equal Returns 1
3 : (1)queue(#include<queue>)
front (): returns the first element of the queue a reference
back (): Returns the queue in the last reference to the element
push (): Insert an element to the end of the queue
pop (): Remove the first item in the queue
size (): returns the number of elements in queue
empty (): If there are no elements in the queue, then returns true
{
(Handwriting queue)
}
(2)priority_queue
top (): Access the head elements
empty (): whether the queue is empty
size (): returns the number of elements in the queue
push (): the element is inserted into the tail (and ordering)
Customizable {
Default descending;
change:
friend bool operator <(use a,use b){
return a.x>b.x;}
}
4: and
deq.size (): the size of the container
max_size (): maximum capacity of the container
deq.resize (): Change the size of the container
empty (): Empty containers sentence
push_front (): Adding the head element
psuh_back (): added to the end elements
pop_front (): Delete the head element
pop_back (): Delete the end of the element
Can be indexed access but the time complexity of large