def merge(left, right):
    """
    Merge 2 array  into a sorted one.

    Args:
       left: array to sort
       right: array to sort
    Returns:
       merged sorted array
    """
    merged = []
    left_index = 0
    right_index = 0

    while left_index < len(left) and right_index < len(right):
        if left[left_index] > right[right_index]:
            merged.append(right[right_index])
            right_index += 1
        else:
            merged.append(left[left_index])
            left_index += 1

    merged += left[left_index:]
    merged += right[right_index:]

    return merged