Question: need coded in c++ Radix sort Come up with an unsorted array of numbers (integer array). Sort the numbers in ascending order and descending order

 need coded in c++ Radix sort Come up with an unsorted

array of numbers (integer array). Sort the numbers in ascending order and

need coded in c++

Radix sort Come up with an unsorted array of numbers (integer array). Sort the numbers in ascending order and descending order and display them using radix sort. First sort in ascending, then reset the array to its original order and finally sort the array again in descending order. General: 4) Why do I need a queue A: You need an array of queues( from 0-9) which correspond to all the possible digits.For example queue[0] will hold all the numbers that contain a zero in the spot that corresponds to the pass that you are on. For example, let's say we have 120, 30,41 For pass 1, Queue[O] would contain 120 and 30 Queue[1] would contain 41 Notice on the 1st pass, we are processing the 1st digit from the right and on each subsequent pass, we would work our way to the right one digit at a time. 5) To display in descending order, can I just display the array backwards A: yes 6) Do I worry about negative numbers? A: You don't have to incorporate negative numbers for this lab 7) Where do I define my array and how big does it have to be? A: You can hardcode your array in your program and make it as big or small as you want it. 8) Can I use stacks instead of queues? A: No, you want to use queues. Queues are FIFO structure. You want to start removing items from the beginning of the list which is what the queue structure is designed for. If you use stacks, then it will remove items from the end of the list since it is a LIFO structure and your numbers will not be properly sorted

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!