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
You leave your house at 5:02 PM and run 20 yards down the street. You don't realize that you forgot your Wallet back at home and
Sidana [21]

Answer:

The average velocity is 0.203 m/s

Explanation:

Given;

initial displacement, x₁ = 20 yards = 18.288 m

final displacement, x₂ = ¹/₃ x 18.288 = 6.096 m

change in time between 5:02 PM and 5:03 PM, Δt = 3 mins - 2 mins = 1 min = 60 s

The average velocity is given by;

V = change in displacement / change in time

V = (x₂ - x₁) / Δt

V = (18.288 - 6.096) / 60

V = 0.203 m/s

Therefore, the average velocity is 0.203 m/s

7 0
3 years ago
Why is oil black and why does oil look black
Rina8888 [55]

Answer:While heat cycles cause oil to darken, soot causes oil to turn black

Explanation:

Most people associate soot with diesel engines, but gasoline engines can produce soot as well, particularly modern gasoline-direct-injection engines. ... Any finer filtration and the filter could catch dissolved additives in the motor oil

4 0
3 years ago
Line.
Veronika [31]

Air supplied to a pneumatic system is supplied through the C. Actuator

Explanation

Pneumatic systems are like hydraulic systems, it is just that these systems uses compressed air rather than hydraulic fluid.  Pneumatic systems are used widely across the industries. these pneumatic systems needs a constant supply of compressed air to operate. This is provided by an air compressor. The compressor sucks in air at a very high rate from the environment and stores it in a pressurized tank. the Air is supplied thereafter with the help of a actuator valve that is a more sophisticated form of a valve.

From the above statement it is clear that Air supplied to a pneumatic system is supplied through the  Actuator

7 0
3 years ago
Which of the eight diagnostic steps for locating an engine performance problem is performed first?
Kay [80]

Answer:

D. Perform a thorough visual inspection.

4 0
3 years ago
A person walks into a refrigerated warehouse with head uncovered. Model the head as a 25- cm diameter sphere at 35°C with a surf
galina1969 [7]

Answer:

Hello some parts of your question is missing below is the missing part

Convection coefficient = 11 w/m^2. °c

answer : 44.83 watts

Explanation:

Given data :

surface emissivity ( ε )= 0.95

head ( sphere) diameter( D )  = 0.25 m

Temperature of sphere( T )  = 35° C

Temperature of surrounding ( T∞ )  = 25°C

Temperature of surrounding surface ( Ts ) = 15°C

б  = ( 5.67 * 10^-8 )

Determine the total rate of heat loss

First we calculate the surface area of the sphere

As = \pi D^{2}  

= \pi * 0.25^2 =  0.2 m^2

next we calculate heat loss due to radiation

Qrad = ε * б * As( T^{4} - T^{4} _{s} )  ---- ( 1 )

where ;

ε = 0.95

б = ( 5.67 * 10^-8 )

As = 0.2 m^2

T = 35 + 273 = 308 k

Ts = 15 + 273 = 288 k

input values into equation 1

Qrad = 0.95 * ( 5.67 * 10^-8 ) * 0.2 ( (308)^4 - ( 288)^4 )

         = 22.83  watts

Qrad ( heat loss due to radiation ) = 22.83 watts

calculate the heat loss due to convection

Qconv = h* As ( ΔT )

           = 11*0.2 ( 35 -25 )  = 22 watts

Hence total rate of heat loss

=  22 + 22.83

= 44.83 watts

5 0
3 years ago
Other questions:
  • In an aircraft jet engine at takeoff, the combustion products expand adiabatically in the exhaust nozzle. At entrance to the noz
    14·1 answer
  • What is the zone that has just been added to the exchange zone where athletes may now hand off the baton
    5·1 answer
  • 11 Notează, în caiet, trăsăturile personajelor ce se pot
    13·1 answer
  • To reduce the drag coefficient and thus improve the fuel efficiency of cars,the design of side rearview mirrors has changed dram
    11·1 answer
  • Rain falls on a 1346 acre urban watershed at an intensity of 1.75 in/hr for a duration of 1 hour. The catchment land use is 20%
    10·1 answer
  • What is the ILS stand for
    8·2 answers
  • Plot da(t) if the output voltage of the converter pole-a is vaN(t)=Vd/2+0.85 Vd/2 sin(Ï1t), where Ï1=2Ï x 60 rad/s
    12·1 answer
  • If you are a subcontractor in the leather and apparel industry, you might make any of the following items EXCEPT which
    7·1 answer
  • It describes the physical and social elements common to this work. Note that common contexts are listed toward the top, and less
    10·2 answers
  • Use the map to answer the question.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!