<reponame>JCPedroza/algorithms-and-data-structures-py<filename>algorithms_and_data_structures/algorithms/sorting/bubble_sort/bubble_sort_naive.py
def bubble_sort(nums: list[float]) -> list[float]:
    for _ in range(len(nums)):
        for indx in range(len(nums) - 1):
            if nums[indx] > nums[indx + 1]:
                nums[indx], nums[indx + 1] = nums[indx + 1], nums[indx]

    return nums


algorithm = bubble_sort
name = 'naive'

def bubble_sort(nums: list[float]) -> list[float]:
    for _ in range(len(nums)):
        for indx in range(len(nums) - 1):
            if nums[indx] > nums[indx + 1]:
                nums[indx], nums[indx + 1] = nums[indx + 1], nums[indx]

    return nums


algorithm = bubble_sort
name = 'naive'