摘要: 刚下班没事干,实现了一个简单的优先级队列#include #include typedef void (*pqueue_setindex) (void *obj, int pq_index);typedef int (*pqueue_cmp) (void* obj1, void* obj2);typedef struct pqueue_struct{ void **heap; int numelem; pqueue_setindex setindex; pqueue_cmp cmp;}pqueue;pqueue* pqueue_new(int pq_size, pqueue_setinde.. 阅读全文
posted @ 2013-08-26 18:47 cgj 阅读(927) 评论(0) 推荐(0) 编辑