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.
- Find the difference between number of silk flowers sold by shop A and B.
What is ratio between total numbers of employees who are unmarried to total number of female employees who are married?
If the boutique introduces a new product line of Accessories with a cost price of ₹400 and a selling price of ₹600, and they sell 200 units in the n...
Total number of burgers sold by Piccolo is approximately what percent of the total number of Veggie burgers sold by all the three cafes?
The number of Butter cookies baked on Wednesday is how much % of the total number of Chocolate cookies baked on all days?
Total number of surgical masks sold on Wednesday is how much percent of the total number of masks sold on Monday?
Find the ratio of the number of male employees and female employees working in company B.
Find the average number of Turkey burger sold by Farzi, Veggie burger sold by Kalsang and Bean burger sold by Piccolo.
40% mask from company A purchased by men. 30% of mask from company B purchased by men. Find the difference between the mask purchased by women from com...
Average number of girls in all three school together is: