bubbleSort(array, n):
for i = 1 -> n-1:
for j = 1 -> n-i-1:
if (array[j] > array[j+1]):
swap(array[j], array[j+1])
BubbleSort
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
bubbleSort(array, n):
for i = 1 -> n-1:
for j = 1 -> n-i-1:
if (array[j] > array[j+1]):
swap(array[j], array[j+1])