首页
Java
登录
6mi
u
盘
搜
搜 索
Java
堆(优先队列)基础
堆(优先队列)基础
xiaoxiao
2021-02-28
65
1.建队列 利用自带的stl模板
#include<queue>
priority_queue<
int
>
q
;
//priorioty
_queue<
int
,vector<
int
>>,greater<
int
>
q
;
2.基本操作
q.pop()
//弹出队顶
q.top()
//返回队首
q.push(n)
//推进队列
转载请注明原文地址: https://www.6miu.com/read-74566.html
技术
最新回复
(
0
)