This project implements and analyzes the performance of three classic sorting algorithms:
- Bubble Sort
- Quick Sort
- Merge Sort
This project features C++ implementations of Bubble Sort, Quick Sort, and Merge Sort, each designed to handle large datasets of 100,000 elements or more. It supports sorting in both ascending and descending order, with detailed performance measurement and timing analysis for each algorithm. Input and output operations are managed through files, ensuring efficient data processing and storage. The results include comprehensive output files containing sorted data and execution metrics, providing clear insights into the efficiency and scalability of each sorting technique.
The project measures and compares:
- Execution Time: Time taken by each algorithm to sort the dataset
- Memory Usage: Space complexity analysis
- Scalability: Performance with large datasets (100,000 elements)
Algorithm | Best Case | Average Case | Worst Case |
---|---|---|---|
Bubble Sort | O(n) | O(n²) | O(n²) |
Quick Sort | O(n log n) | O(n log n) | O(n²) |
Merge Sort | O(n log n) | O(n log n) | O(n log n) |
The output files contain:
- Sorted arrays in ascending/descending order
- Execution time measurements
- Performance comparison metrics
This project demonstrates:
- Implementation of fundamental sorting algorithms
- Performance analysis and benchmarking
- File I/O operations in C++
- Algorithm complexity analysis
- Large dataset processing techniques
This project was developed as part of a data structures and algorithms course to understand the practical performance differences between various sorting techniques.