摘要:
一、概念堆是一种数组对象,却被视频一棵完全二叉树二、程序#include <iostream>
#include <stdio.h>
using namespace std; #define PARENT(i) (i)>>1
#define LEFT(i) (i)<<1
#define RIGHT(i) ((i)<<1)+1 int length = 10;//数组中元素的个数
int heap_size = 10;//属于堆的元素个数,看到HeapSort就会明白 /******************其它************* 阅读全文