
    Given a collection of student essay scores where negative scores indicate areas needing improvement and positive scores represent strengths, reorganize the first n most recent scores so that all improvement areas appear before strengths while maintaining their original relative order within each category. The reorganized assessment will help instructors prioritize feedback for students who need the most support while preserving the chronological context of performance within each category.
    

    
def re_arrange_array(arr, n):
    """
    Given a collection of student essay scores where negative scores indicate areas needing improvement and positive scores represent strengths, reorganize the first n most recent scores so that all improvement areas appear before strengths while maintaining their original relative order within each category. The reorganized assessment will help instructors prioritize feedback for students who need the most support while preserving the chronological context of performance within each category.
    

    """
def re_arrange_array(arr, n):
    """
    Given a collection of student essay scores where negative scores indicate areas needing improvement and positive scores represent strengths, reorganize the first n most recent scores so that all improvement areas appear before strengths while maintaining their original relative order within each category. The reorganized assessment will help instructors prioritize feedback for students who need the most support while preserving the chronological context of performance within each category.
    

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