Skip to content

Commit 82cf0e6

Browse files
Creating a explanation of Bubblesort in portuguese (trekhleb#423)
Co-authored-by: Oleksii Trekhleb <[email protected]>
1 parent ae22574 commit 82cf0e6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Bubble Sort
2+
3+
O bubble sort, ou ordenação por flutuação (literalmente "por bolha"), é um algoritmo de ordenação dos mais simples. A ideia é percorrer o vetor diversas vezes, e a cada passagem fazer flutuar para o topo o maior elemento da sequência. Essa movimentação lembra a forma como as bolhas em um tanque de água procuram seu próprio nível, e disso vem o nome do algoritmo.
4+
5+
![Algorithm Visualization](https://pt.wikipedia.org/wiki/Ficheiro:Bubble_sort_animation.gif)
6+
7+
## Complexity
8+
9+
| Name | Best | Average | Worst | Memory | Stable | Comments |
10+
| --------------------- | :-------------: | :-----------------: | :-----------------: | :-------: | :-------: | :-------- |
11+
| **Bubble sort** | n | n<sup>2</sup> | n<sup>2</sup> | 1 | Yes | |
12+
13+
## References
14+
15+
- [Wikipedia](https://pt.wikipedia.org/wiki/Bubble_sort)
16+

0 commit comments

Comments
 (0)