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
RideAnS [48]
3 years ago
5

Suppose values is a sorted array of integers. Give pseudocode that describes how a new value can be inserted so that the resulti

ng array stays sorted.
Engineering
1 answer:
Novosadov [1.4K]3 years ago
7 0

Answer:

insert (array[] , value , currentsize , maxsize )

{

   if maxsize <=currentsize

  {

      return -1

  }

  index = currentsize-1

  while (i>=0 && array[index] > value)

  {

      array[index+1]=array[index]

      i=i-1

  }

 

  array[i+1]=value

  return 0

}

Explanation:

1: Check if array is already full, if it's full then no component may be inserted.

2: if array isn't full:

  • Check parts of the array ranging from last position of range towards initial range and determine position of that initial range that is smaller than the worth to be inserted.  
  • Right shift every component of the array once ranging from last position up to the position larger than the position at that smaller range was known.
  • assign new worth to the position that is next to the known position of initial smaller component.
You might be interested in
Select the correct answer.
andre [41]

Answer:

A. energy transformations

Explanation:

8 0
2 years ago
Bore = 3"
Grace [21]
I need help my self lol XD
5 0
3 years ago
Read 2 more answers
¿Qué áreas del conocimiento me pueden<br> aportar a la ejecución del proyecto?
allsm [11]

Answer:

la escuela,en casa y listo...............

8 0
3 years ago
The results of a _________ test will determine if there is suitable drainage and the size of the drain field that will be requir
topjm [15]

Answer:

The results of a percolation test will determine if there is suitable drainage and the size of the drain field that will be required for a septic system.

7 0
2 years ago
A motor car shaft consists of a steel tube 30 mm internal diameter and 4 mm thick. The engine develops 10 kW at 2000 r.p.m. Find
tresset_1 [31]

The maximum shear stress in the tube when the power is transmitted through a 4: 1 gearing is 28.98 MPa.

<h3>What is power?</h3>

Power is the energy transferred per unit time.

Torque is find out by

P = 2πNT/60

10000 = 2π x 2000 x T / 60

T =47.74 N.m

The gear ratio Ne / Ns =4/1

Ns =2000/4 = 500

Ts =Ps x 60/(2π x 500)

Ts =190.96 N.m

Maximum shear stress τ = 16/π x (T / (d₀⁴ - d₁⁴))

τ max =T/J x D/2
where d₁ = 30mm = 0.03 m

           d₀ = 30 +(2x 4) = 38mm =0.038 m

Substitute the values into the equation, we get

τ max = 16 x 190.96 x 0.038 /π x (0.038⁴ - 0.03⁴)

τ max = 28.98 MPa.

Thus, the maximum shear stress in the tube is 28.98 MPa.

Learn more about power.

brainly.com/question/13385520

#SPJ1

7 0
2 years ago
Other questions:
  • If 20 kg of iron, initially at 12 °C, is added to 30 kg of water, initially at 90 °C, what would be the final temperature of the
    6·1 answer
  • A well-insulated tank in a vapor power plant operates at steady state. Saturated liquid water enters at inlet 1 at a rate of 125
    8·1 answer
  • Two loads connected in parallel draw a total of 2.4 kW at 0.8 pf lagging from a 120-V rms, 60-Hz line. One load absorbs 1.5 kW a
    5·1 answer
  • What is the ideal cooling system for low horsepower motor? For example1hp motor
    9·1 answer
  • 5. The pin support at A allows _______. Select the one that applies. (a) displacement in the x direction (b) rotation about its
    15·1 answer
  • How did engineers help to create a ceiling fan
    8·1 answer
  • View the picture below and then correctly answer the questions using the following words: Temperate Zone, Tropical Zone, Polar Z
    6·2 answers
  • Resistors of 150 Ω and 100 Ω are connected in parallel. What is their equivalent resistance?
    13·1 answer
  • According to the article, what is one reason why commercial carmakers aim to develop driverless technology?
    9·1 answer
  • The complete stress distribution obtained by superposing the stresses produced by an axial force and a bending moment is correct
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!