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.
Five years hence, age of 'A' will be 17 years. Ratio of present age of 'B' to 'A' is 5 : 3. If 'C' is 3 years younger than 'B', then find the age of 'C'...
The present age ratio of X and Y is 4:5. Also, the ratio of X’s age 7 years ago and Y’s age 6 years later is 1:2. Find their total current age.
‘A’ is 4 years younger than ‘B’ and 6 years elder than ‘C’. If the present age of ‘B’ and ‘D’ is 28 years and 20 years, respectively...
- The present age ratio of M and N is 7:9. In 6 years, their age ratio will be 5:6. Find the present age of M.
The current age of the mother is six times that of her daughter. In 12 years, the ratio of their ages will be 8:3. Determine the ...
The current average age of Sohan, Mohan, and Rohan is 30 years. 10 years from now, the ratio of the ages of Sohan and Mohan will be 17:16 respectively, ...
Shalini is younger than Rashi by 3 years. If the ratio of Shalini and Rashi ages is 5:6 respectively, then find the age of Shalini.
The present age of a father is three times that of his son. After 10 years, the father’s age will be twice that of his son. What are their current age...
The respective ratio of the present ages of A and B is 4:5. The present age of C is 20% more than that of B. The sum of the present ages of A, B and C i...
A’s age is 150% of what he was 3 years ago, But 75% of what it will be after 3 years. What is his present age?