(String[] args)
| 54 | } |
| 55 | |
| 56 | public static void main(String[] args) { |
| 57 | int arr[] = { 4, 23, 6, 78, 1, 54, 231, 9, 12 }; |
| 58 | int n = arr.length; |
| 59 | System.out.println("The original Heap sort is: "); |
| 60 | printArr(arr); |
| 61 | |
| 62 | HeapSort heapSort = new HeapSort(); |
| 63 | heapSort.sort(arr); |
| 64 | |
| 65 | System.out.println("The sorted array is"); |
| 66 | printArr(arr); |
| 67 | } |
| 68 | } |