
    Design a function for a smart parking system that reorganizes the status data of parking spaces in a specified zone, ensuring all vacant spots are grouped before occupied spots while maintaining their original classification order within each group. The function should process an array of parking space status values (where negative values indicate vacancy types and positive values indicate occupancy types) and operate on a specified number of spaces in the target zone. The reorganized arrangement must preserve the relative ordering of different vacancy types and occupancy classifications to maintain the parking facility's specialized space allocation rules.
    

    
def re_arrange_array(arr, n):
    """
    Design a function for a smart parking system that reorganizes the status data of parking spaces in a specified zone, ensuring all vacant spots are grouped before occupied spots while maintaining their original classification order within each group. The function should process an array of parking space status values (where negative values indicate vacancy types and positive values indicate occupancy types) and operate on a specified number of spaces in the target zone. The reorganized arrangement must preserve the relative ordering of different vacancy types and occupancy classifications to maintain the parking facility's specialized space allocation rules.
    

    """
def re_arrange_array(arr, n):
    """
    Design a function for a smart parking system that reorganizes the status data of parking spaces in a specified zone, ensuring all vacant spots are grouped before occupied spots while maintaining their original classification order within each group. The function should process an array of parking space status values (where negative values indicate vacancy types and positive values indicate occupancy types) and operate on a specified number of spaces in the target zone. The reorganized arrangement must preserve the relative ordering of different vacancy types and occupancy classifications to maintain the parking facility's specialized space allocation rules.
    

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