Sorting Algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is Bubble sort?

A
  1. Look at the first two and if they are in order don’t change anything otherwise swap them.
  2. Look at the next two and do the same
    and then keep on repeating the process until they are all in order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Merge sort?

A
  1. Splits the list in half
  2. repeat step 1 until each set has two items
  3. merge pairs so that each set has two more items and then sort them in order then repeat this step till all of them are in order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an Insertion Sort?

A
  1. Look at the second item on the list
  2. Compare it to all of the items before just incase its the first item and insert the number into the right place
  3. Repeat step 2 until the last number in the list has been inserted into the correct place
How well did you know this?
1
Not at all
2
3
4
5
Perfectly