Courses‎ > ‎APCS - Term 1‎ > ‎Konstantinovich‎ > ‎

2019-04-01

posted Apr 1, 2019, 6:14 AM by Konstantinovich Samuel   [ updated Apr 1, 2019, 7:11 AM ]
Repo:
MKS22X-Radix

Radix.java

One public method:
    public static void radixsort(int[]data){}

Radix sort should get faster when the arraySize : maxValue ratio increases. (More elements and smaller max value)

Negative values can be done as per the discussion in class (today) Make sure you take notes!



Though we are sorting ints, this sort could be modified to work on an array of objects that have some kind of int value that can be obtained by a common method, i.e. "public int getValue()" Since the <E> would then have to be more complex, and that is beyond what we want to discuss now.



Comments