prioity_queue
prioity_queue
实际上是一个大顶堆,定义在<queue>
中
prioity_queue<int> qu
为大顶堆
priority_queue<int,vector<int>,greater<int> > qu;
为小顶堆
.push()
.pop()取出元素,但不返回值
.top()不取出元素,返回值
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment