135k views
0 votes
What is bubble sort?what is bubble sort ​

2 Answers

6 votes

Answer: Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted.

Step-by-step explanation:

Worst complexity: n^2

Average complexity: n^2

Best complexity: n

Space complexity: 1

Method: Exchanging

Stable: Yes

Class: Comparison sort

User Moshisho
by
5.4k points
7 votes

Answer:

Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted.

Step-by-step explanation:

Look at the photo

Good luck

What is bubble sort?what is bubble sort ​-example-1
User FGo
by
5.9k points