Nội dung text CSE221 Assignment 01 (Summer 2025)
7. You have been asked to sort the following array of integers in descending order: Index 0 1 2 3 4 5 6 7 Number 30 25 17 15 10 8 5 1 You decided to use Quick Sort using the first element as pivot for the task. a) Will your approach be efficient in this case? Why or why not? Give proper reasoning. [2] b) Write the recurrence relation of your approach and calculate the time complexity. You have to show the steps and proper mathematical logic. [3] c) Suppose, you are working in a system where you need to sort a very big dataset. The memory available to you can barely accommodate the data. You have two options – merge sort & quick sort. Which one should you choose? Why? [2]