1. The performance of the radix sort from the previous project can be improved by using more supplementary lists (rather than just list0 and list1). For example, you can have an array of 16 lists, which we’ll call list[0] through list[15]. Each item of the original list is put into list[index], where the index is computed by the equation:
index = (n >> i) % 16;
During each iteration, you should add 4 to i and multiply the divisor by 16. Reimplement this base 16 version of the radix sort, or use some larger base of your own choosing. Don’t make the base too big, though, since the number of supplementary lists is equal to the base.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here