definition
What is merge sort?
A divide-and-conquer sorting algorithm that recursively splits and merges.
A trial deck for common sorting ideas, tradeoffs, and simple algorithm recall.
By Flashcardy · 10 cards
definition
What is merge sort?
A divide-and-conquer sorting algorithm that recursively splits and merges.
definition
What is quicksort?
A sorting algorithm that partitions around a pivot and recursively sorts the parts.
comparison
Which is usually better in worst-case time: merge sort or bubble sort?
Merge sort.
comparison
Which sort is stable by default: merge sort or quicksort?
Merge sort.
cloze
Bubble sort repeatedly compares and swaps ___ elements.
adjacent
cloze
Insertion sort grows a sorted portion on the ___ side of the array.
left
sequence
What comes first in merge sort?
Split the array into smaller halves.
sequence
What comes after partitioning in quicksort?
Recursively sort the partitions.
example
Which algorithm is a good fit for a small, nearly sorted list?
Insertion sort.
classification
Is merge sort comparison-based or non-comparison-based?
Comparison-based.