Embercode
✕
SortingQuick quiz

Radix

6 questions. Covers Radix sort.

Questions 1 to 5 of 6

  1. 1. Put the steps of one bucket_pass in the order the code runs them.

    Use the arrows to put the steps in order.

    1. 1.Clear the list
    2. 2.Append the values from bucket 0 to bucket 9 back into the list
    3. 3.Add each value to the back of the bucket for its digit, in list order
    4. 4.Create ten empty buckets, numbered 0 to 9
  2. 2. Put these lists in the order they appear during radix_sort on 170 45 75 90 802 24 2 66, from the first pass to the last.

    Use the arrows to put the steps in order.

    1. 1.2 24 45 66 75 90 170 802
    2. 2.170 90 802 2 24 45 75 66
    3. 3.802 2 24 45 66 170 75 90
  3. 3. The lesson's bucket_pass is run once with place equal to 10 on the list below. What is the list afterwards? ``cpp std::vector<int> a = {13, 8, 21, 100}; bucket_pass(a, 10); ``
  4. 4. The lesson's radix_sort is run on the list below. What does the list hold afterwards? ``cpp std::vector<int> b = {75, 71, 170, 2}; radix_sort(b); ``
  5. 5. In a bucket pass, the rule that keeps the order of values with equal digits from earlier passes is called being ___.

    Type your answer.

3 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.