Topic 16 - Sorting Flashcards

1
Q

What types of Sorting Algorithms are there?

A

1) Insertion Sort
2) Selection Sort
3) Quick Sort

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

Define: Insertion Sort

A

Orders a sequence of values by repetitively inserting a particular value into a sorted subset of the sequence

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

Time complexity / O(n) of sort stack.

A

(n^2)

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

What is the best case for sorting algorithm? Worst case?

A

Already sorted in reversed order. O(n)

Already sorted in correct order. O(n^2)

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