Sorting Algorithms: Bubble, Quick, and Merge Sort Implementation
VerifiedAdded on 2019/09/18
|7
|2917
|71
Homework Assignment
AI Summary
This programming assignment focuses on implementing and evaluating different sorting algorithms. Students are tasked with generating fake survey data using a pseudo-random number generator (PRNG) and storing it in a 2D array. They must then implement Bubble Sort, Quick Sort, and Merge Sort algorithms to sort the generated data. The project requires performance analysis by measuring the execution time of each sorting algorithm with varying data sizes and visualizing the results in a 2D line chart. Students are also expected to document their code thoroughly, including header comments, explanatory comments, and meaningful variable names. An optional bonus involves using function pointers to select the sorting algorithm dynamically. The assignment culminates in a comprehensive analysis of the efficiency of the implemented algorithms and the impact of different data sizes on their performance. Finally, the students must release the memory allocated for the data structures.