Simplified Counting Sort
Write a program that sorts a collection of 30 test scores each in the range 0 to 100. Use the following algorithm: Initialize each member of an integer array, score (length 101), to zero. For each test score x, increment score[x]. For each i from 0 to 100, print i as many times as the array entry score[i] indicates. This sorting routine is useful when the range of the data is limited. The procedure is a simplified version of what is appropriately called counting sort .
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here