Library
Exercises
Games
Exams
Resources
Forum
News
Light
Log in
Sign up
Library
Exercises
Games
Exams
Resources
Forum
News
All courses
Library
Sorting Algorithms
Why is merge sort O(n log n)?
MCQ
Which explanation justifies the O(n log n) complexity of merge sort?
Possible answers
There are log2(n) levels of splitting, and each level costs O(n) to merge
It compares each pair of elements only once in total
It uses an internal binary search to place each element
It only sorts half the array and guesses the other half
Log in to reply
Previous
Exercise 3 of 4
Next exercise
Report a mistake or suggest an improvement