Professional Documents
Culture Documents
Worksheet - 2
Worksheet - 2
Worksheet - 2
Merge sort will be the best algorithm for this task because it ensures the best time complexities
i.e. O(n log n).
Merge Sort is a stable sort which means that the same element in an array maintain their
original positions with respect to each other. It is efficient in the worst case as well.
2. Algorithm:
Output:
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):