This C++ program demonstrates the Counting Sort algorithm for sorting an array of integers in three different scenarios: best case, average case, and worst case. The program measures and reports the execution time of the sorting process for each case and verifies whether the result is sorted correctly.
- Best Case: The array is already sorted in ascending order.
- Average Case: The array contains random integer values.
- Worst Case: The array is sorted in descending order.
The main.cpp file contains example code that demonstrates the usage of Counting Sort in different cases. You can use it as a reference for implementing Counting Sort in your own projects.