
    Design a content moderation function that takes a list of posts with their sentiment scores and a number n, and reorganizes the n most recent posts in the moderation queue so that all potentially harmful posts (with negative sentiment scores) appear before safe posts (with positive sentiment scores), while maintaining the original chronological order within each category. The function should only process the specified number of recent posts n, leaving any remaining posts unchanged in the queue.
    

    
def re_arrange_array(arr, n):
    """
    Design a content moderation function that takes a list of posts with their sentiment scores and a number n, and reorganizes the n most recent posts in the moderation queue so that all potentially harmful posts (with negative sentiment scores) appear before safe posts (with positive sentiment scores), while maintaining the original chronological order within each category. The function should only process the specified number of recent posts n, leaving any remaining posts unchanged in the queue.
    

    """
def re_arrange_array(arr, n):
    """
    Design a content moderation function that takes a list of posts with their sentiment scores and a number n, and reorganizes the n most recent posts in the moderation queue so that all potentially harmful posts (with negative sentiment scores) appear before safe posts (with positive sentiment scores), while maintaining the original chronological order within each category. The function should only process the specified number of recent posts n, leaving any remaining posts unchanged in the queue.
    

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