<jupyter_start><jupyter_text>Bubble Sort<jupyter_code>def bubbleSort(arr):
    arrLen = len(arr)
    sortedArray = False
    # traverse through the array till sorted
    while not sortedArray:
        swapCount = 0;
        for i in range(arrLen - 1):
            # do the swapping for a higher next element
            if arr[i] > arr[i+1]:
                # swap
                arr[i], arr[i+1] = arr[i+1], arr[i]
                swapCount += 1
        if swapCount == 0:
            sortedArray = True
        else:
            arrLen -= 1
    return arr

print(bubbleSort([8, 5, 2, 9, 5, 6, 3]))<jupyter_output>[2, 3, 5, 5, 6, 8, 9]
{'fraction_non_alphanumeric': 0.11616954474097331, 'fraction_numerical': 0.03453689167974882, 'mean_word_length': 1.7982456140350878, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '328336', 'license': 'MIT', 'n_tokens_mistral': 236, 'n_tokens_neox': 215, 'n_words': 64, 'path': 'DS_with_python/ds_with_python.ipynb', 'repo_name': 'Akshaychdev/Python-Scripts-Notebooks', 'size': '637'}