#include using namespace std; int h[10],n; void heapbottom(int h[],int n) { int i,j; for (i=n/2;i>=1;i--) { int k=i; int v=h[k]; bool heap=false; while(!heap&&2*k<=n) { cout<<"\n i value is :"<=h[j]) heap=true; else { h[k]=h[j]; k=j; } h[k]=v; }//end of while } cout<<"\n HEAP GENERATED \n"; for(int i=0;i>n; cout<<"\n Enter the array to perform heap sort \n"; for(int i=0;i>h[i]; heapbottom(h,n); return 0; }