Question
In this project, you will use radix.txt as the input file, and output the integers SORTED USING RADIX SORT. Your main program will input the
In this project, you will use radix.txt as the input file, and output the integers SORTED USING RADIX SORT.
Your main program will input the integers and put them into a QUEUE. It will then pass this queue to a method called radixSort which will sort the numbers in the queue, passing the sorted queue back to main.
The main program will then call another method to print the contents of this (sorted queue) .
This is what I have so far:
public static void main(String[] args) { File inFile=new File("radix.txt"); Scanner scnr=null; //Try/Catch try{ scnr=new Scanner(inFile); } catch(FileNotFoundException e){ } String temp = null; String[] fileStrings = new String[25]; createArray(fileStrings); Queue
public static int getLength(String[]nums){ int i, j; int max = 0; int count = 0; int size = nums.length; String s = null; for (i=0; i if (s.length() > max){ max = s.length(); } } } return max; } Need help creating the radix sort using an array of queues. Please help.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started