a[index*2+2] = a[index];
a[index] = temp;
}
}
}
}
int maxHeapDelete(int *a, int length)
{
maxHeap(a,length,0);
int temp;
temp = a[length-1];
a[length-1] = a[0];
a[0]=temp;
return a[length-1];
}
int main(){
int a[8]={1, 2, 6, 4, 3, 7, 9, 11};
//maxHeap(a,8,0);
//cout<
int temp;
for(int i=0; i<8;i++)
{
cout<
//for(int i=0; i<8; i++) cout<
}