mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-12-19 08:59:05 +08:00
Trim trailing whitespaces.
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
_Read this in other languages:_
|
||||
[_Português_](README.pt-BR.md)
|
||||
|
||||
Bubble sort, sometimes referred to as sinking sort, is a
|
||||
simple sorting algorithm that repeatedly steps through
|
||||
the list to be sorted, compares each pair of adjacent
|
||||
items and swaps them if they are in the wrong order
|
||||
Bubble sort, sometimes referred to as sinking sort, is a
|
||||
simple sorting algorithm that repeatedly steps through
|
||||
the list to be sorted, compares each pair of adjacent
|
||||
items and swaps them if they are in the wrong order
|
||||
(ascending or descending arrangement). The pass through
|
||||
the list is repeated until no swaps are needed, which
|
||||
the list is repeated until no swaps are needed, which
|
||||
indicates that the list is sorted.
|
||||
|
||||

|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Bubble Sort
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||

|
||||
|
||||
|
||||
Reference in New Issue
Block a user