Driver Code to test above
int main ( ) { int arr [ ] = { 10 , 20 , 15 , 17 , 9 , 21 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; printf ( " Given ▁ array : ▁ " ) ; for ( int i = 0 ; i < n ; i ++ ) printf ( " % d ▁ " , arr [ i ] ) ; printf ( " STRNEWLINE STRNEWLINE " ) ; heapSort ( arr , n ) ;