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
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