Sorting Flashcards

1
Q

what are the 3 sorting algorithms?

A

bubble
insertion
merge

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

what is bubble sort?

A

this sorting method is where the algorithm compares the 2 adjacent items in a list and swaps them accordingly. this process will continue and more passes will be done until there is a pass where no swaps are made

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

what is insertion sort?

A

is a sorting algorithm that sorts by creating and inserting the next value into the correct place before moving on to the next value

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

what is merge sort?

A

a sorting method where the list is divided into sublists containing one item each before comparing the individual sublists and joining them together until one large sorted list is created

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

what are some benefits and negatives of bubble sort?

A

works well on small lists but is the slowest

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

what are some benefits and negatives of insertion?

A

more efficient than bubble sort
slower than merge sort

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

what are some benefits and negatives of merging sort?

A

fastest method
complicated to program

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