
    Design a function that analyzes user compatibility scores in a social network to identify potential friendship conflicts, where a conflict occurs when a user with higher compatibility is positioned after a user with lower compatibility in the recommendation sequence. The function should count the total number of such conflicts in the given compatibility score sequence to help optimize friend recommendations and minimize mismatched connections.
    

    
def get_Inv_Count(arr):
    """
    Design a function that analyzes user compatibility scores in a social network to identify potential friendship conflicts, where a conflict occurs when a user with higher compatibility is positioned after a user with lower compatibility in the recommendation sequence. The function should count the total number of such conflicts in the given compatibility score sequence to help optimize friend recommendations and minimize mismatched connections.
    

    """
def get_Inv_Count(arr):
    """
    Design a function that analyzes user compatibility scores in a social network to identify potential friendship conflicts, where a conflict occurs when a user with higher compatibility is positioned after a user with lower compatibility in the recommendation sequence. The function should count the total number of such conflicts in the given compatibility score sequence to help optimize friend recommendations and minimize mismatched connections.
    

    """
    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