
    Design a fraud pattern analyzer that processes a customer's n most recent transactions and reorganizes them to group all suspicious transactions before normal ones while maintaining their chronological sequence within each category. The analyzer takes a transaction history array where negative values indicate suspicious activities and positive values represent normal transactions, along with an integer n specifying the analysis window size. The reorganized pattern must preserve the relative timing of transactions within both suspicious and normal categories to maintain accurate temporal fraud patterns.
    

    
def re_arrange_array(arr, n):
    """
    Design a fraud pattern analyzer that processes a customer's n most recent transactions and reorganizes them to group all suspicious transactions before normal ones while maintaining their chronological sequence within each category. The analyzer takes a transaction history array where negative values indicate suspicious activities and positive values represent normal transactions, along with an integer n specifying the analysis window size. The reorganized pattern must preserve the relative timing of transactions within both suspicious and normal categories to maintain accurate temporal fraud patterns.
    

    """
def re_arrange_array(arr, n):
    """
    Design a fraud pattern analyzer that processes a customer's n most recent transactions and reorganizes them to group all suspicious transactions before normal ones while maintaining their chronological sequence within each category. The analyzer takes a transaction history array where negative values indicate suspicious activities and positive values represent normal transactions, along with an integer n specifying the analysis window size. The reorganized pattern must preserve the relative timing of transactions within both suspicious and normal categories to maintain accurate temporal fraud patterns.
    

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