Question
Which of the following is true about the time complexity
of Merge Sort?Solution
Correct Option: Merge Sort (C) has a time complexity of O(n log n) in both the best and worst cases due to its divide-and-conquer approach, where the list is recursively split and merged. Why Other Options Are Wrong: A) O(n), O(n^2): Merge Sort does not have a quadratic time complexity in the worst case, nor does it achieve linear time in the best case. B) O(log n), O(log n): This is incorrect as merge sort deals with linear elements and requires O(n log n) time due to both sorting and merging. D) O(n), O(n log n): While some algorithms achieve linear time in the best case, Merge Sort consistently performs at O(n log n). E) O(n^2), O(n^2): This complexity is associated with algorithms like bubble sort in the worst case, not Merge Sort.
In an office, the ratio of the number of males to number of females is 11:8. If 3 males joined the class and 4 females left the class, then the ratio of...
Eight friends, A, B, C, D, E, F, G, and H are sitting around a square table facing the centre of the table. Four of them are sitting at the corners whil...
What is the maximum amount of gratuity payable to the employees under the Payment of Gratuity Act, 1972 ?
What is the provision for lay-offs, retrenchment, and closure without government permission in the new industrial relation code?
Maximum number of protected workmen:
Nalanda University flourished during the reign of which of the following rulers?
Which of the following means “by what authority”?
Consider the following statements:
1. Part 'B' of the Budget speech of the finance minister includes description of the initiatives on economi...
Which one of the following represents 1 GB of information?
With reference to Objectives Resolution, consider the following statements:
1. It was moved by Dr. B R Ambedkar in the Constituent Assembly.
...