
    Given a list of projected arrival times for delivery vehicles in a fleet, determine the number of potential traffic conflicts by counting pairs of vehicles where a vehicle arriving later is positioned ahead of a vehicle with an earlier arrival time in the current route sequence. This count will help identify the minimum number of route adjustments needed to optimize the delivery schedule and minimize traffic conflicts between vehicles.
    

    
def get_Inv_Count(arr):
    """
    Given a list of projected arrival times for delivery vehicles in a fleet, determine the number of potential traffic conflicts by counting pairs of vehicles where a vehicle arriving later is positioned ahead of a vehicle with an earlier arrival time in the current route sequence. This count will help identify the minimum number of route adjustments needed to optimize the delivery schedule and minimize traffic conflicts between vehicles.
    

    """
def get_Inv_Count(arr):
    """
    Given a list of projected arrival times for delivery vehicles in a fleet, determine the number of potential traffic conflicts by counting pairs of vehicles where a vehicle arriving later is positioned ahead of a vehicle with an earlier arrival time in the current route sequence. This count will help identify the minimum number of route adjustments needed to optimize the delivery schedule and minimize traffic conflicts between vehicles.
    

    """
    inv_count = 0
    for i in range(len(arr)):
        for j in range(i + 1, len(arr)):
            if arr[i] > arr[j]:
                inv_count += 1
    return inv_count