Problem Statement:
HeapSort is a comparison-based sorting technique where we first build Max Heap and then swap
the root element with the last element (size times) and maintains the heap property each time
to finally make it sorted. Write a Program to implement Heap sort in Java.1.
Example
Input:
10 20 15 17 9 21
Output:
9 10 15 17 20 21