Assignment: #Sorting Due: 04/22/2018 Points: 5

Specification

Sorting.java is the codebase for this two part programming assignment. The program consists of two primary methods: counting_sort() and radix_sort().

Note: These two sort algorithms are covered during lecture.

counting_sort()

Implement the given counting_sort() method such that it sorts an array of type byte where the elements are in the [Byte.MIN_VALUE, Byte.MAX_VALUE] interval.

Important note: The sort must be an implementation of a Counting Sort algorithm.

radix_sort()

Make the following two modifications to the given radix_count() method.

It is okay to rewrite this method to implement the required modifications.

Expected Output

The output of this program should match the following.

counting_sort()...
original:  7 -128 0 7 -7 127 0 7 -128 7 42 -42 
sorted:  -128 -128 -42 -7 0 0 7 7 7 7 42 127 

radix_sort()...
original:  201 -8 1024 23 301 98 -25 7 0 401 98 7 
sorted:  -25 -8 0 7 7 23 98 98 201 301 401 1024