Driver program
public static void main ( String [ ] args ) { int arr [ ] = { 4 , 6 , 3 , 2 , 9 } ; int n = arr . length ; heapSort ( arr , n ) ; System . out . println ( " Sorted ▁ array ▁ is ▁ " ) ; printArray ( arr , n ) ; } }