Driver Code
public static void Main ( String [ ] args ) { int [ ] arr = { 10 , 20 , 15 , 17 , 9 , 21 } ; int n = arr . Length ; Console . Write ( " Given ▁ array : ▁ " ) ; printArray ( arr ) ; heapSort ( arr , n ) ; Console . Write ( " Sorted ▁ array : ▁ " ) ; printArray ( arr ) ; } }