
    Given a list of professional connection scores and a radius-based subset size n, reorganize the first n professionals in the network so that all professionals with dissimilar interests (negative scores) are grouped before those with similar interests (positive scores), while maintaining the original relative ordering within each group.
    

    
def re_arrange_array(arr, n):
    """
    Given a list of professional connection scores and a radius-based subset size n, reorganize the first n professionals in the network so that all professionals with dissimilar interests (negative scores) are grouped before those with similar interests (positive scores), while maintaining the original relative ordering within each group.
    

    """
def re_arrange_array(arr, n):
    """
    Given a list of professional connection scores and a radius-based subset size n, reorganize the first n professionals in the network so that all professionals with dissimilar interests (negative scores) are grouped before those with similar interests (positive scores), while maintaining the original relative ordering within each group.
    

    """
    j = 0
    for i in range(0, n):
        if arr[i] < 0:
            temp = arr[i]
            arr[i] = arr[j]
            arr[j] = temp
            j = j + 1
    return arr