FastSortsComplexity Flashcards

1
Q

In-Place definition

A

A sort that moves elements around elements around an array, original order is lost

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

Partition definition

A

Diving an array into two or more parts

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

Stability definition

A

whether or no the relative order of equal elements will change as a result of sort

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

Natural order definition

A

The desired order of elements when finished sorting

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

What is Selection Sort?

A

Look for minimum, swap current element for minimum. After each iter, the min is placed in the front of the unsorted list

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

What is Merge Sort?

A

Divide array into sub-arrays, continue diving until the lists only contain one element. Merge sub-arrays back together in sorted order. Continuing merging until all subarrays are merged back in order.

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

What is Quick Sort?

A

Choose a pivot value at some index, create two new arrays: less array and greater array with values less and greaters than pivot. Recursively sort both pieces, and then concatenate them back together.

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