Topic 16 - Sorting Flashcards
1
Q
What types of Sorting Algorithms are there?
A
1) Insertion Sort
2) Selection Sort
3) Quick Sort
2
Q
Define: Insertion Sort
A
Orders a sequence of values by repetitively inserting a particular value into a sorted subset of the sequence
3
Q
Time complexity / O(n) of sort stack.
A
(n^2)
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)