The purpose of this project is to compare eleven different sorting algorithms through experimentation to determine their efficiency and suitability for various applications. We experimented with our program to obtain data for analysis in our report and created a GUI to visualize the different sorting algorithms. This comprehensive approach allowed us to both study and demonstrate the performance characteristics of each algorithm in a user-friendly manner.
Sorting algorithms have been developed to handle different data structures, sizes, and performance requirements. Each algorithm has unique characteristics, making it suitable for specific applications. Our project compares these algorithms by evaluating their performance on several metrics, including the number of comparisons, swaps, and execution time. We use graphical representations to illustrate the results and draw conclusions about each algorithm's efficiency for different data sizes.
We compare various sorting algorithms by generating test cases with varying input sizes (1000, 2000, 3000, 5000, 7000, 10000) using randomized lists of numbers. The main metric measured is the number of comparisons, reflecting the algorithm's efficiency. We implement the sorting algorithms using classes and relationships, with a base class containing common methods and attributes. Derived classes override the base class's virtual function to implement specific sorting algorithms.
- Base Class: Contains common methods and attributes for all sorting algorithms.
- Derived Classes: Implement specific sorting algorithms, each with unique functions where necessary.
- Main Function: Declares array size, prints unsorted and sorted arrays to files, and outputs the number of comparisons.
We analyze eleven sorting algorithms, discussing their efficiency and limitations. The algorithms are compared both theoretically and practically to determine their suitability for various industries and applications.
- Mostafa Gaafar: 900214463, section 05
- Kareem Elnaghy: 900223587, section 05
- Jana El Morsy: 900221875, section 01
- Course: CSCE 1101
- Institution: The American University in Cairo
- Date: May 13, 2022
- GitHub Repository for Visualizer: QT Visualizer for Sorting Algorithms
- Visualizer Demo Video: Included within the files
- Presentation Link: Canva Presentation