---
title: "Discussion on \"Basics Sorting Algorithm: BubbleSort (Python)\" | Hashnode"
description: "Discussion on \"Basics Sorting Algorithm: BubbleSort (Python)\". BubbleSort uses nested for loops in order to sort an array and therefore has a time complexity of O(n^2). That is slow, but it is still an important algorithm to know.\nHow it works:\nTake array, arr = [54, 26, 93, 17, 77, 31, 44, 55, 20]\nsize, n = 9\nB..."
url: "https://hashnode.com/posts/basics-sorting-algorithm-bubblesort-python/60030f0b7b30c23b714a908d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Basics Sorting Algorithm: BubbleSort (Python)](https://codingbasics.hashnode.dev/basics-sorting-algorithm-bubblesort-python?utm_source=hashnode&utm_medium=feed)

BubbleSort uses nested for loops in order to sort an array and therefore has a time complexity of O(n^2). That is slow, but it is still an important algorithm to know. How it works: Take array, arr = \[54, 26, 93, 17, 77, 31, 44, 55, 20\] size, n = 9 B...

Jan 16, 2021 · 3 min read · codingbasics.hashnode.dev  
Read the article

-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#python](https://hashnode.com/tag/python)
-   [#python3](https://hashnode.com/tag/python3)

## Written by

[Sid](https://hashnode.com/@skidhs)

@skidhs

  
[View profile](https://hashnode.com/@skidhs)

Software Engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
