public static void SortMethod(int[] arr)
 {
     for (int i = arr.Length - 1; i > 0; i--)
     {
         buildMaximumHeap(arr, i + 1);
         HeapSort.Swap(arr, 0, i);
     }
 }
 public static void SortMethod(int[] arr, int length)
 {
     if (length > 1)
     {
         for (int i = arr.Length / 2 - 1; i >= 0; i--)
         {
             heapify(arr, i, length);
         }
         HeapSort.Swap(arr, 0, length - 1);
         SortMethod(arr, --length);
     }
 }