Questions: Merge Sort

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A developer sorts customer records first alphabetically by last name, then applies a second sort by account tier (Gold/Silver/Bronze). She needs customers with the same tier to remain in alphabetical order after the second sort. Which property of merge sort makes this reliable?

AIts O(n log n) guaranteed time complexity in all cases
BIts ability to sort linked lists without auxiliary space
CIts stability — equal elements preserve their relative order from the previous sort
DIts external sort capability for large datasets
Question 2 Multiple Choice

A developer benchmarks merge sort and quicksort on random arrays and finds quicksort is consistently faster in practice. What does merge sort still offer that might justify choosing it?

ABetter average-case time complexity — merge sort's O(n log n) beats quicksort's average
BLower memory usage — merge sort runs in O(1) auxiliary space
CGuaranteed O(n log n) worst-case performance and stability, regardless of input order
DFaster performance on nearly-sorted arrays due to its adaptive design
Question 3 True / False

Merge sort's time complexity degrades to O(n²) on already-sorted or reverse-sorted input, similar to naive quicksort.

TTrue
FFalse
Question 4 True / False

Merge sort can be implemented without any auxiliary space if the input data is stored in a linked list rather than an array.

TTrue
FFalse
Question 5 Short Answer

Explain why merge sort's total work across all levels of recursion is O(n log n) rather than O(n²).

Think about your answer, then reveal below.