
C-PROGRAM HEAP SORT #include<stdio.h> #include<stdlib.h> void heapify1(int *a, int lim) {int i,j,tmp,left,right,fg=0; i=1; while(fg==0){ left=2*i; right=(2*i)+1; if(right<=lim) { if(a[i]<a[left] || a[i]< a[right]){ if(a[left]>a[right]){ tmp=a[left]; a[left]=a[i]; a[i]=tmp; i=left; } else { tmp=a[right]; a[right]=a[i]; a[i]=tmp; i=right; }} else {fg=1;} }else if (left<=lim){ if(a[left]>a[i]){ tmp=a[left]; a[left]=a[i]; a[i]=tmp; ...