def bubblesort(numbs: list) -> list:
    """
    Go through the array from left to right, for each couple of
    numbers, check which one is bigger. If the first element of
    the couple is bigger than the second, swap the two numbers.
    Repeat the same process until the array is sorted (i.e.
    when the number of swaps is equal to 0).

    :param numbs: The array to be sorted
    :return: The sorted array
    """
    for i in range(len(numbs) - 1):
        for j in range(len(numbs) - i - 1):
            if numbs[j] > numbs[j + 1]:
                numbs[j], numbs[j + 1] = numbs[j + 1], numbs[j]

    return numbs