Question
This is in java and have to create the linked list. You have to sort an array of student-ids. Student ids have a range 1-
This is in java and have to create the linked list. You have to sort an array of student-ids. Student ids have a range 1- 99999. Write a program to sort the following student id's in ascending order using radix (bucket) sort and print the sorted list on console. You are not allowed to use Java API list classes.
Format of I/O:
Enter the list of integers to be sorted, separated by blank spaces: 8178 32 315 19 45921 7130 4 563 1999 390 2873 431
Number of passes required: 5
Pass 1 buckets are: 0: 390 7130 1: 431 45921 2: 32 3: 563 2873 4: 4 5: 315 6: 7: 8: 8178 9: 19 1999
Pass 2 buckets are: 0: 4 1: 19 315 2: 45921 3: 32 431 7130 4: 5: 6: 563 7: 2873 8178 8: 9: 390 1999
Pass 3 buckets are: 0: 4 19 32 1: 7130 8178 2: 3: 315 390 4: 431 5: 563 6: 7: 8: 2873 9: 1999 45921
Pass 4 buckets are: 0: 4 19 32 315 390 431 563 1: 1999 2: 2873 3: 4: 5: 45921 6: 7: 7130 8: 8178 9:
Pass 5 buckets are: 0: 4 19 32 315 390 431 563 1999 2873 7130 8178 1: 2: 3: 4: 45921 5: 6: 7: 8: 9: Sorted List: 4 19 32 315 390 431 563 1999 2873 7130 8178 45921
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