Question
Which sorting algorithm is the most efficient for large
datasets and uses a divide-and-conquer approach?Solution
Merge Sort is a divide-and-conquer algorithm that divides the dataset into smaller subarrays, sorts each recursively, and merges them back to form a sorted array. Its time complexity is O(n log n) in all cases, making it highly efficient for large datasets.Advantages of Merge Sort include:
- Stability: It maintains the order of equal elements.
- Predictable performance: Consistent time complexity across best, worst, and average cases.
- Handles large datasets effectively, especially when external memory (e.g., disk storage) is involved.
Find the wrong no in the given number series.
175, 319, 488, 694, 909, 1165
2824 2314 1973 1759 1634 1574
Find the wrong number in given number series.
7, 8, 27, 215,997, 8988.
- Find the wrong number in the given number series.
8, 12, 21, 46, 95, 195 1648, 1690, 1741, 1807, 1938, 2140
Direction: Find the wrong number in given number series.
214, 230, 294, 550, 1574 , 5470.
- Find the wrong number in the given number series.
32, 48, 80, 108, 162, 243 Find the wrong number in given number series.
2482, 2507, 2607, 2842, 3232, 3857
Find the wrong number in the given number series.
84, 120, 183, 246, 336, 444
5, 6, 8, 16, 38, 158