19cse212lab3sorting
You work as a software developer for a company that needs to sort a large dataset of customer information. The dataset contains millions of records, each with several fields such as name, address, phone number, and email. The company wants to sort the dataset by name, and they have asked you to implement a sorting algorithm to do this.
Step 1: Choose one of the sorting algorithms (insertion sort, selection sort, or bubble sort) and implement it in your preferred programming language. Use your implementation to sort a small dataset of at least 100 records by name and output the sorted list.
Step 2: Now, test your implementation on a larger dataset of at least one million records. Measure the time it takes to sort the dataset and record the result.
Step 3: Repeat step 2 for each of the other two sorting algorithms, and compare the performance results.
Write a brief report explaining the tradeoffs between the sorting algorithms based on the performance results. Which algorithm performed the best? Why do you think that is? What are the advantages and disadvantages of each algorithm in terms of time complexity, space complexity, and stability? Which algorithm would you choose for sorting large datasets in a production environment, and why?
Comments