Question
(C++) Using linked lists and numbers.txt, use radix sort and print it to the console. Specification: Radix sort is a unique sorting algorithm; implement the
(C++) Using linked lists and numbers.txt, use radix sort and print it to the console.
Specification:
Radix sort is a unique sorting algorithm; implement the Radix Sort algorithm. Use the numbers.txt (shown below) for the numbers to sort.
* Convert your linked list code (https://www.chegg.com/homework-help/questions-and-answers/c-write-program-reads-list-words-wordstxt-file-shown-stores-singly-linked-list-prints-word-q26295882) to have a 'prev' AND 'next' pointer (or object). (DoublyLinkedList)
* Use the DynamicArray from (https://www.chegg.com/homework-help/questions-and-answers/c-using-pseudo-code-listed-extend-include-reading-data-strings-file-convert-int-based-cont-q26217211) to make a dynamic array of SinglyLinkedLists (use your now DoublyLinkedList - use the next, rather than prev, node).
* The 10 positions in the array of LinkedList are used for each base 10 radix. In mathematical numeral systems, the radix or base is the number of unique digits, including zero, used to represent numbers in a positional numeral system. For example, for the decimal system the radix is ten, because it uses the ten digits from 0 through 9.
* Read the numbers.txt file and sort them using the Radix Sort algorithm.
* Output the sorted numbers to the console.
numbers.txt (this should work if there are many more numbers in the file):
9380
64
21111
11053
27116
23354
13272
21277
233
42453
2
4324
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