摘要: 堆有两种: max-heap 和 min-heap. Max-heap 一般用来排序,Min-heap 用来实现 priority queue.max-heap的定义是:for each i: A[parent(i)] >= A[i]min-heap: for each i: A[parent(i)... 阅读全文
posted @ 2014-07-18 02:09 门对夕阳 阅读(194) 评论(0) 推荐(0) 编辑