The key steps for Bubble Sort are:
The key steps for Insertion Sort are:
The key steps for Merge Sort are:
Merge function
arr)arr; repeat from Step 2The key steps for Quick Sort are:
lt) and greater-than-equal (gte) subarrayslt; if element greater than or equal pivot, append to gte.lt and gtelt, gte, and pivot into a single arrayWhich two sorts are in-place?
[Merge Sort and Quick Sort are both out-of-place]
What is the time complexity for an Insertion Sort?
O(n^2)
Under what circumstances is the quicksort most suboptimal?
When the provided list is nearly sorted or already sorted.
What is the time complexity for a Quick Sort?
O(n log n)
What does it mean when a sorting algorithm is said to be ‘stable’?
A stable sorting algorithm ensures that elements with identical sorting properties still maintain their original order.
What is the key determining factor that affects the execution time of a sort algorithm?
The size of the given list.