Bubble Sort And Insertion Sort Flashcards

1
Q

How does a bubble sort work?

A

Bubble up the smallest (or largest) item to the end of the list, then the second smallest, then the third smallest and so on until no more swaps are needed

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

How does an insertion sort work?

A

The algorithm takes one data item from the list and places it in the current location in the new list

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