def bubble_sort(array):
    """
    my own implementation of the bubble sort algorithm.

    Args:
        array (list[int]): A unsorted list with n numbers.

    Returns:
        list[int]: The sorted input list.

    Examples:
        >>> bubble_sort([]) == sorted([])
        True

        >>> bubble_sort([1]) == [1]
        True

        >>> bubble_sort([4,3,2,1]) == sorted([4,3,2,1])
        True

        >>> bubble_sort(['a','d','h','c']) == sorted(['a','d','h','c'])
        True
    """

    for _ in range(len(array)-1):
        for j in range(len(array)-1):
            if array[j] > array[j+1]:
                array[j], array[j+1] = array[j+1], array[j]

    return array