GDB cs502
GDB cs502
Cs502
Student ID:ـ
Solution:-
Merge Sort
Reason no1:-
Merge sort is well suited for handling large datasets and works efficiently on mostly unsorted data with
some pre-ordered segments .Its divide-and-conquer approach ensures stable and predictable
performance with a time complexity of o(nlogn).
Reason no2:-
Since Merge sort is stable , it maintains the relative order of equal elements, which is crucial for sorting
by multiple attributes( e.g, timestamps after amounts ).This makes it ideal for datasets with complex
sorting requirements involving multiple keys.