CLRS: heap sort and priority queue
摘要:
//ref: CLRS $6#include <stdio.h> #include <stdlib.h> #include <time.h> #include <assert.h> #include <algorithm> #define MAX 20int number[MAX+1];int heap_size;void printHeap(){ for(int i = 1; i <= heap_size; i++) { printf("%d ", number[i]); } printf("\n 阅读全文
posted @ 2011-02-22 20:46 cutepig 阅读(326) 评论(0) 推荐(0) 编辑