make_heap精简实现

闲来无事,实现下make_heap函数

void makeHeap(int* a,int p,int r){
	
	a += (p-1);
	int n = r - p + 1;
	for(int i=2;i=1 && a[cp]


你可能感兴趣的:(算法)