Skip to content

Commit 0b6e77b

Browse files
authored
Merge pull request #309 from khushi-parikh/feature/my-contribution
hacktoberfest - changed language of bubble_sort.py from portugese to english
2 parents 1fc84c8 + 6afac77 commit 0b6e77b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/python/bubble_sort.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
""" Implementação do algoritmo bubble sort com recursão """
1+
""" Implementation of the bubble sort algorithm with recursion """
22

33

44
def bubble_sort(data, size):
55
"""
6-
Implementação de um algoritmo de bubble sort com recursão.
6+
Implementation of a bubble sort algorithm with recursion.
77
8-
Argumentos:
9-
data: lista. Lista que será ordenada
10-
size: int. Tamanho da lista
8+
Arguments:
9+
data: list. List to be sorted
10+
size: int. List size
1111
12-
Retorna a lista "data" ordenada.
12+
Returns the ordered "date" list.
1313
"""
1414
swap = False
1515
for i in range(0, size - 1):
@@ -21,7 +21,7 @@ def bubble_sort(data, size):
2121

2222

2323
if __name__ == "__main__":
24-
lista_nao_ordenada = [2, 9, 8, 0, 1, 3, 5, 4, 6, 7]
25-
print(lista_nao_ordenada)
26-
bubble_sort(lista_nao_ordenada, len(lista_nao_ordenada))
27-
print(lista_nao_ordenada)
24+
data = [2, 9, 8, 0, 1, 3, 5, 4, 6, 7]
25+
print(data)
26+
bubble_sort(data, len(data))
27+
print(data)

0 commit comments

Comments
 (0)