Question

Sort the following numbers using Radix sort: 1, 24, 13, 143, 17, 11, 88, 36, 127

Sort the following numbers using Radix sort: 1, 24, 13, 143, 17, 11, 88, 36, 127

Homework Answers

Answer #1

The Radix Sort Algorithm: Do following for each digit i where i varies from least significant digit to the most significant digit.

Original, unsorted list:
1, 24, 13, 143, 17, 11, 88, 36, 127

Sorting by least significant digit (1s place) gives:

1, 11, 13, 143, 24, 36, 17, 127, 88

here for 13 and 143 we place 13 before 143 because 13 occurred before 143, same did for 17 and 127.

Sorting by next digit (10s place) gives:

1, 11, 13, 17,24, 127, 36, 143, 88

Sorting by most significant digit (100s place) gives:

1,11, 13, 17, 24, 36, 88, 127, 143

Final sorted list : 1,11, 13, 17, 24, 36, 88, 127, 143

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
CODE IN C++. The first 11 prime integers are 2, 3, 5, 7, 11, 13, 17,...
CODE IN C++. The first 11 prime integers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and 31. A positive integer between 1 and 1000 (inclusive), other than the first 11 prime integers, is prime if it is not divisible by 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and 31. Instructions Write a program that prompts the user to enter a positive integer between 1 and 1000 (inclusive) and that outputs whether the number...
Write the continued fraction representation of each of the following rational numbers. (a) 18/13 (b) 49/17...
Write the continued fraction representation of each of the following rational numbers. (a) 18/13 (b) 49/17 (c) 17/23
10, 15, 17, 18, 29, 15, 17, 18, 16, 24, 13, 38, 49, 29, 14, 25,...
10, 15, 17, 18, 29, 15, 17, 18, 16, 24, 13, 38, 49, 29, 14, 25, 21, 14, 35, 37, 38, 10, 19, 28, 17, 19, 24, 31, 32, 25, 26, 28, 19, 17, 24 Draw the following charts using the dataset above. Please write a sentence or two interpreting the result (35 pts): Histogram with five bins (be sure to use class boundaries) (10pts) Boxplot (15pts) Stem and Leaf Plot (10pts)
I have the following question please: Consider the following sequence of numbers 8, 1, 11, 4,...
I have the following question please: Consider the following sequence of numbers 8, 1, 11, 4, 2, 9, 10, 5, 3, 12, 6, 7 Sort the list using quick sort with the middle element as pivot. Show the state of the list after each call to the partition procedure. You are not required to write code for this question. You need to trace through the different sorting algorithms using the given list Please could you provide me with a complete...
Consider the following data: 25 24 18 20 21 18 16 20 23 17 15 13...
Consider the following data: 25 24 18 20 21 18 16 20 23 17 15 13 19 23 24 20 16 26 21 24 15 22 16 12 20 23 19 26 20 25 21 19 21 25 23 26 21 19 20 14 (a) Develop a frequency distribution using classes of 12-14, 15-17, 18-20, 21-23, and 24-26. Class Frequency   12-14   15-17   18-20   21-23   24-26     Total (b) Develop a relative frequency distribution and a percent frequency distribution using the classes...
Indices   DUR   DUR (OLD) 1   6   11 2   13   14 3   11   14 4   7   10...
Indices   DUR   DUR (OLD) 1   6   11 2   13   14 3   11   14 4   7   10 5   9   9 6   7   10 7   8   11 8   5   8 9   7   6 10   7   10 11   7   13 12   3   5 13   10   13 14   3   15 15   4   12 16   9   7 17   9   8 18   10   13 19   6   10 20   8   14 21   10   14 22   8   18 23   2   10 24   4   11 25   7   16 26  ...
Consider the following sequence of numbers 8, 1, 11, 4, 2, 9, 10, 5, 3, 12,...
Consider the following sequence of numbers 8, 1, 11, 4, 2, 9, 10, 5, 3, 12, 6, 7 c) Sort the list using quick sort with the middle element as pivot. Show the state of the list after each call to the partition procedure. You are not required to write code for this question. You need to trace through the different sorting algorithms using the given list. Please could I get an answer to the above question through using 9...
CAN YOU PLEASE ANSWER ALL THESE QUSTIONS 1.In Merge sort, how many additional recursive partitioning levels...
CAN YOU PLEASE ANSWER ALL THESE QUSTIONS 1.In Merge sort, how many additional recursive partitioning levels are required for a list of 64 elements compared to a list of 8 elements? a. 3 b. 9 c. 8 d. 6 2. Which function best represents the number of operations in the worst-case for the following code fragment? for (i = 0; i < N; ++i) {    if (numbers[i] % 2 == 1)       factor = 2.5 } a. f(N) = 6N2 b....
PYTHON The following code implements this algorithm to sort a list of numbers in ascending order....
PYTHON The following code implements this algorithm to sort a list of numbers in ascending order. But some code is missing as indicated by '?'. def sort_in_place(list_num): for i in range(?): for j in range(?): if ?: temp = list_num[j] list_num[j] = list_num[i] list_num[i] = temp my_list = [23,1,45,20,13,-34] sort_in_place(my_list) print(my_list) Modify the three lines of code in the program below so that the output is [-34, 1, 13, 20, 23, 45]
1) Find the sample variance and standard deviation 15 36 21 20 17 14 2)Find the...
1) Find the sample variance and standard deviation 15 36 21 20 17 14 2)Find the population variance and standard deviation for the following population. 12 4 17 7 24 26
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT