Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

LSD_RadixSort using arrayedList:(Help me write this in JAVA) Here is my Code: pa

ID: 3560332 • Letter: L

Question

LSD_RadixSort using arrayedList:(Help me write this in JAVA)

Here is my Code:

package lib280.sorting;

import lib280.list.arrayed.ArrayedList280;
import lib280.list.linked.LinkedList280;


public class RadixSort {
  
   public static void LSDRadixListBuckets(int items[]) {
       ArrayedList280<LinkedList280<Integer>> buckets = new ArrayedList280<LinkedList280<Integer>>(10);
      
       // TODO -- Implement radix sort here. Note that ArrayedList280 has a newly added method called
       // getItemAtIndex(int i) which allows you to retrieve the i-th element in the list in O(1) time.

   }
   
   public static void main(String args[]) {
       // TODO -- Write your test program here.
   }
}

Algorithm for RadixSort:

UML Diagram:

In the above algorithm, the array list represents buckets, one for each possible digit in base-ten numbers. You will implement the algorithm twice; each implementation will use a different data structure for the buckets. In the first implementation you must use an arrayed list of linked lists to implement the buckets:

Explanation / Answer

import java.util.ArrayList; import java.util.Random; public class Radix{ public static void main ( String args[] ){ ArrayList[] buckets = new ArrayList[10]; for(int c=0; c