SHARE
TWEET

Untitled

a guest Nov 13th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main(void)
  2. {
  3.     int n, i;
  4.     scanf("%d", &n);
  5.     int *array = (int*) malloc(n*sizeof(int));
  6.     for(i = 0; i < n; i++)
  7.         scanf("%d", &array[i]);
  8.     heapsort(array, n);
  9.     for(i = 0; i < n; i++)
  10.         printf("%d ", array[i]);
  11.     free(array);
  12.     return 0;
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top