def bubble_sort(nsl: list) -> list:
    """
    classic sorting algorithm - bubble sort.
    :param nsl: type list: non sorted list
    :return: type list: sorted list
    """

    sl = nsl[:]
    n = len(sl)

    if n < 2:
        return sl

    for i in range(len(sl)):
        for j in range(len(sl) - 1, i, -1):
            if sl[j] > sl[j-1]:
                sl[j], sl[j-1] = sl[j-1], sl[j]

    return sl