## C++ Counting Sort

What is counting sort? How to implement in C++? Counting sort works when the input is known to be withing a range. Create an array of size of input range. Go through each of the numbers in the input and increment the appropriate array value (input number is mapped as the index to array). Now …