导航

2014年8月13日 #

优先队列

摘要: 许多应用程序都需要处理有序的元素,但不一定要求全部有序。一个合适的数据结构应该支持两种操作:删除最大元素和插入元素。 1 #include 2 #include 3 using namespace std; 4 5 6 struct node 7 { 8 int priority; ... 阅读全文

posted @ 2014-08-13 22:36 水中游 阅读(144) 评论(0) 推荐(0) 编辑