(arr, simulation=False)
return arr
Heap Sort that uses a min heap to sort an array in ascending order
        Complexity: O(n log(n))
Heap Sort that uses a min heap to sort an array in ascending order
        Complexity: O(n log(n))
Heap Sort that uses a min heap to sort an array in ascending order Complexity : O ( n log ( n ))
def min_heap_sort(arr, simulation=False):
    """ Heap Sort that uses a min heap to sort an array in ascending order
        Complexity: O(n log(n))
    """
    iteration = 0
    if simulation:
        print("iteration",iteration,":",*arr)
        
    for i in range(0, len(arr) - 1):
        iteration = min_heapify(arr, i, simulation, iteration)

    return arr
def min_heap_sort ( arr , simulation = False ) : iteration = 0 if simulation : print ( "iteration" , iteration , ":" , * arr ) for i in range ( 0 , len ( arr ) - 1 ) : iteration = min_heapify ( arr , i , simulation , iteration ) return arr