0% found this document useful (0 votes)
3 views1 page

GDB cs502

Uploaded by

bilalmusakhel786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

GDB cs502

Uploaded by

bilalmusakhel786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

GDB

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.

You might also like