
    Design a loan assessment algorithm that reorganizes the n most recent customer financial records so that all liabilities appear before assets, while maintaining the chronological sequence within each category, to facilitate rapid risk evaluation. The algorithm should process an array of financial indicators where negative values represent liabilities and positive values represent assets, ensuring the original timing of events within each category remains unchanged for accurate credit history analysis.
    

    
def re_arrange_array(arr, n):
    """
    Design a loan assessment algorithm that reorganizes the n most recent customer financial records so that all liabilities appear before assets, while maintaining the chronological sequence within each category, to facilitate rapid risk evaluation. The algorithm should process an array of financial indicators where negative values represent liabilities and positive values represent assets, ensuring the original timing of events within each category remains unchanged for accurate credit history analysis.
    

    """
def re_arrange_array(arr, n):
    """
    Design a loan assessment algorithm that reorganizes the n most recent customer financial records so that all liabilities appear before assets, while maintaining the chronological sequence within each category, to facilitate rapid risk evaluation. The algorithm should process an array of financial indicators where negative values represent liabilities and positive values represent assets, ensuring the original timing of events within each category remains unchanged for accurate credit history analysis.
    

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