Skip to content

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.

Notifications You must be signed in to change notification settings

vovandreevik/Counting-Sort-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Counting Sort Algorithm in C++

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.

The program uses Counting Sort to sort arrays of integers in the following three scenarios:

  • 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.

Examples

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.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages