栈、队列、堆总结

零、基本操作

/*栈的基本操作:*/
std::stack<int> s;
s.top();
s.push();
s.pop();
s.empty();
s.size();

/*队列的基本操作:*/
std::queue<int> q;
q.front();
q.push(x);
q.back();
q.pop();
q.empty();
q.size();
/*堆的基本操作*/
int main()
{
    std::priority_queue<int> big_heap;
    std::priority_queue<int,std::

猜你喜欢

转载自blog.csdn.net/dai_wen/article/details/81712239