lab/lab13/RadixSort.java
public static String[] sort(String[] asciis) {
        // TODO: Implement LSD Sort
        // TODO: sort Strings => pad them on the right with empty values.
        // TODO: Make sure the method is NON-destructive (the original list cannot be modified).

        String[] sorted = new String[asciis.length];
        System.arraycopy(asciis, 0, sorted, 0, asciis.length);

        // get the maximum length of string in asciis
        int max = 0;
        for (String asc : asciis) {
            max = max > asc.length() ? max : asc.length();
        }

        int index = 0;
        while (index < max) {
            sorted = sortHelperLSD(sorted, index);
            index += 1;
        }

        return sorted;
    }
/**
     * Does LSD radix sort on the passed in array with the following restrictions:
     * The array can only have ASCII Strings (sequence of 1 byte characters)
     * The sorting is stable and non-destructive
     * The Strings can be variable length (all Strings are not constrained to 1 length)
     *
     * @param asciis String[] that needs to be sorted
     *
     * @return String[] the sorted array
     */
Does LSD radix sort on the passed in array with the following restrictions:
The array can only have ASCII Strings (sequence of 1 byte characters)
The sorting is stable and non-destructive
The Strings can be variable length (all Strings are not constrained to 1 length)

@param asciis String[] that needs to be sorted

@return String[] the sorted array
Does LSD radix sort on the passed in array with the following restrictions : The array can only have ASCII Strings ( sequence of 1 byte characters ) The sorting is stable and non - destructive The Strings can be variable length ( all Strings are not constrained to 1 length ) @param asciis String [] that needs to be sorted @return String [] the sorted array
public static String[] sort(String[] asciis) {
        String[] sorted = new String[asciis.length];
        System.arraycopy(asciis, 0, sorted, 0, asciis.length);
        int max = 0;
        for (String asc : asciis) {
            max = max > asc.length() ? max : asc.length();
        }
        int index = 0;
        while (index < max) {
            sorted = sortHelperLSD(sorted, index);
            index += 1;
        }
        return sorted;
    }
public static String [ ] sort ( String [ ] asciis ) { String [ ] sorted = new String [ asciis . length ] ; System . arraycopy ( asciis , 0 , sorted , 0 , asciis . length ) ; int max = 0 ; for ( String asc : asciis ) { max = max > asc . length ( ) ? max : asc . length ( ) ; } int index = 0 ; while ( index < max ) { sorted = sortHelperLSD ( sorted , index ) ; index += 1 ; } return sorted ; }
Does LSD radix sort on the passed in array with the following restrictions:
 The array can only have ASCII Strings (sequence of 1 byte characters)
 The sorting is stable and non-destructive
 The Strings can be variable length (all Strings are not constrained to 1 length)
Does LSD radix sort on the passed in array with the following restrictions : The array can only have ASCII Strings ( sequence of 1 byte characters ) The sorting is stable and non - destructive The Strings can be variable length ( all Strings are not constrained to 1 length )
// TODO: Implement LSD Sort // TODO: sort Strings => pad them on the right with empty values. // TODO: Make sure the method is NON-destructive (the original list cannot be modified). // get the maximum length of string in asciis