1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
anzhelika [568]
3 years ago
10

Suppose we use radix sort to sort the English-language strings below using standard lexicographic ordering (i.e. sort in alphabe

tical order). We sort least-to-greatest and consider the numbers in top-to-bottom order when assigning them to bins. Assume the empty string" comes before all letters in lexicographic order. PART TRIP
TARP
ART
TRAP
CHIP

a) (1 point) How many passes are required to sort the strings?
b) (1 point) How many buckets would radix sort allocate to sort the strings?
c) (5 points) For each of the following pairs of words, fill in the circle next to the word that would appear earlier in the list after two passes of radix sort.
i) TRIP or TARP
CHIP or TRIP
iii) ART or PART
iv) PART or TARP
v) TARP or TRAP

d) State the runtime of radix sort on each of the following inputs set as precisely as you can. Include any known constant factors. i) (1 pt) Runtime on English-language strings of length d: ii) (1 pt) Runtime on decimal integers of length d:

Engineering
1 answer:
nlexa [21]3 years ago
7 0

Answer:

a) 4 passes are required to sort the string.

b) 4

c)   i) TARP

    ii) CHIP

    iii) PART

    iv) TARP

    v) TARP

d) O(k+n), n is no. of strings, k is largest no. of character in among the string

   O(d*(n+10)), n is no. of integers

Explanation:

You might be interested in
Should aircraft wings have infinite stiffness?
Colt1911 [192]

Answer:

No, they need to be somewhat flexible so that forces such as turbulance don't shear the wing off.

3 0
3 years ago
Read 2 more answers
You are driving on a roadway with multiple lanes of travel in the same direction, and are approaching an emergency vehicle parke
solmaris [256]

Answer: a. Leave the lane closest to the emergency as soon as it is safe to do so, or slow down to a speed of 20 MPH below the posted speed limit.

Explanation:

Giving a way to the law enforcement vehicle and a medical emergency vehicle is necessary. If one approaches an emergency vehicle parked along the roadway one should change the lane as the vehicle may not move and the driver may also waste his or her time also one should also slow down his or her speed while approaching the vehicle as most of the emergency vehicle are in rush to reach the hospital so the driver should maintain some distance with the medical emergency vehicle.

7 0
3 years ago
Q5
Klio2033 [76]

The C++ code that would draw all the iterations in the selection sort process on the array is given below:

<h3>C++ Code</h3>

#include <stdio.h>

#include <stdlib.h>

int main() {

   int i, temp1, temp2;

   int string2[16] = { 0, 4, 2, 5, 1, 5, 6, 2, 6, 89, 21, 32, 31, 5, 32, 12 };

   _Bool check = 1;

   while (check) {

       temp1 = string2[i];

       temp2 = string2[i + 1];

       if (temp1 < temp2) {

           string2[i + 1] = temp1;

           string2[i] = temp2;

           i = 0;

       } else {

           i++;

           if (i = 15) {

               check = !check;

           }

       }

   }

   

   return 0;

}

Read more about C++ programming here:

brainly.com/question/20339175

#SPJ1

5 0
2 years ago
A closed, rigid tank is filled with a gas modeled as an ideal gas, initially at 27°C and a gage pressure of 300 kPa. If the gas
ch4aika [34]

Answer:

gauge pressure is 133 kPa

Explanation:

given data

initial temperature T1 = 27°C = 300 K

gauge pressure = 300 kPa = 300 × 10³ Pa

atmospheric pressure = 1 atm

final temperature T2 = 77°C = 350 K

to find out

final pressure

solution

we know that gauge pressure is = absolute pressure - atmospheric pressure so

P (gauge ) = 300 × 10³ Pa - 1 × 10^{5} Pa

P (gauge ) = 2 × 10^{5} Pa

so from idea gas equation

\frac{P1*V1}{T1} = \frac{P2*V2}{T2}   ................1

so {P2} = \frac{P1*T2}{T1}

{P2} = \frac{2*10^5*350}{300}

P2 = 2.33 × 10^{5} Pa

so gauge pressure = absolute pressure - atmospheric pressure

gauge pressure = 2.33 × 10^{5}  - 1.0 × 10^{5}

gauge pressure = 1.33 × 10^{5} Pa

so gauge pressure is 133 kPa

4 0
3 years ago
What advanced safety features are now standard on 2023 Z?
Anettt [7]

The advanced safety features that are now standard on 2023 Z are:

  • Pedestrian Detection and Automatic Emergency Braking
  • Intelligent Forward Collision Warning (IFCW).
  • Blind Spot Alert.

<h3>What is 2023 Z?</h3>

The above is the short name or nickname for the All New 2023 Nissan Z coupe Sports car.

The care also features Advanced driver assist and safety technology which relieves the driver's everyday workload, allowing you to focus on what matters most.

Learn more about safety features in cars:
brainly.com/question/24078882
#SPJ1


3 0
2 years ago
Other questions:
  • Two players find themselves in a legal battle over a patent. The patent is worth 20 for each player, so the winner would receive
    14·1 answer
  • Create a program named IntegerFacts whose Main() method declares an array of 10 integers.Call a method named FillArray to intera
    12·1 answer
  • A square power screw has a mean diameter of 30 mm and a pitch of 4 mm with single thread. The collar diameter can be assumed to
    14·1 answer
  • 4-6. A vertical cylindrical storage vessel is 10 m high and 2 m in diameter. The vessel contains liquid cyclohexane currently at
    7·1 answer
  • Why must air tanks be drained​
    15·1 answer
  • An aggregate blend is composed of 55% aggregate A (Sp. Gr. 2.631), 25% aggregate B (Sp. Gr. 2.331) and 20% sand (Sp. Gr. 2.609).
    8·1 answer
  • Suppose there is a mobile application that can run in two modes: Lazy or Eager. In Lazy Mode, the execution time is 3.333 second
    11·1 answer
  • QUESTION 6
    10·1 answer
  • For binary flash distillation, we discussed in class that there are 8 variables (F, ZA, V, ya, L, XA, P and T) and 4 equations d
    10·1 answer
  • You have three gear wheels a, b and c connected to each other,if you turn the first gear wheel "a" clockwise what will happen to
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!