Sorting Algorithms for Sequences Flashcards
1
Q
Sorting algorithm
A
Determines approach how the data should be arranged in a specific order
2
Q
Why is sorting important?
A
Data can be more readable and can be optimised to a high level
3
Q
In-place sorting
A
When program does not require any extra spaces so is sorted within the data structure itself like an array
4
Q
Not-in-place sorting
A
When program requires extra space which is >= to elements being sorted
5
Q
In-place sorting examples
A
Bubble sort
6
Q
Not-in-place sorting examples
A
Merge-sort