2.1 Bubble sort Flashcards

1
Q

What does a bubble sort do?

A

Sorts an unordered list of items

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does a bubble sort work?

A
  • It compares each item with the next one and swaps them if they are out of order
  • The algorithm finishes when no more swaps need to be made
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some features of the bubble sort?

A
  • This is the most inefficient of the sorting algorithms but is very easy to implement
  • This makes it a popular choice for very small data sets
How well did you know this?
1
Not at all
2
3
4
5
Perfectly