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
Identify factors that can cause a process to become out of control. Give several examples of such factors.
Oliga [24]

Answer:

Explained

Explanation:

This situation can occur because of various factors such as:

  • Gradual deterioration of lubrication and coolant.
  • change of environmental condition such as temperature, humidity, moisture, etc.
  • Change in the properties of incoming raw material
  • An increase or decrease in the temperature of the heat treating operation
  • Debris interfering with the manufacturing process.
4 0
3 years ago
Does the Diesel engine have engine knock or detonation problem? Why?
Luda [366]

Explanation:

Yes Diesel engine have problem of knocking.

We know that knocking is phenomenon in which suddenly large amount of power generates this large amount of power will cause the failure of diesel engine.

Actually when one set of fuel inject inside the cylinder to burn with already compressed air (in general up to 10-15 bar) then this fuel does not burn complete and accumulate inside the cylinder.After that second set of fuel inject inside the cylinder then that one set of fuel burns with second set of fuel and produces large amount of sudden power for engine and causes the breaks in the crank or connecting rod of engine.it leads to damage the engine.

6 0
3 years ago
A second inventor was driving down the highway in her Prius one day with her hand out the window. She happened to be driving thr
Eva8 [605]

Answer:

Explanation:

It wouldn't work because the wind energy she would be collecting would actually come from the car engine.

The relative wind velocity observed from a moving vehicle is the sum of the actual wind velocity and the velovity of the vehicle.

u' = u + v

While running a car will generate a rather high wind velocity, and increase the power generated by a wind turbine, the turbine would only be able to convert part of the wind energy into electricity while adding a lot of drag. In the end, it would generate less energy that what the drag casuses the car to waste to move the turbine.

Regenerative braking uses an electric generator connected to the wheel axle to recover part of the kinetic energy eliminated when one brakes the vehicle. Normal brakes dissipate this energy as heat, a regenerative brake uses it to recharge a batttery. Note that is is a fraction of the energy that is recovered, not all of it.

A "regenerative accelerator" makes no sense. Braking is taking kinetic energy out of the vehicle, while accelerating is adding kinetic energy to it. Cars accelerate using the power from their engines.

6 0
3 years ago
What is the purpose of gears?
Brrunno [24]

Answer:

To help wheels move in a circle

Explanation:

6 0
3 years ago
As the asteroid falls closer to the Earth's surface its _______ energy decreases and its _______ energy increases.
Levart [38]

Answer:

As the asteroid falls closer to the Earth's surface its <u>Gravitational</u> <u>Potential</u> energy <em>decreases</em> and its <u>Kinetic</u> energy <em>increases</em>.

4 0
3 years ago
Other questions:
  • PLZ HURRY IM ON A TIMER
    6·1 answer
  • How can you evaluate whether the slope of the dependent variable with an independent variable is the same for each level of the
    13·1 answer
  • Select the correct answer.
    13·1 answer
  • What are two reasons why Hunter edjucation is important?<br><br><br> 30 pts
    12·1 answer
  • By using order of magnitude analysis, the continuity and Navier-Stokes equations can be simplified to the Prandtl boundary-layer
    9·1 answer
  • Component(s) that only allow(s) electrons to flow in one direction. Mark all that apply
    15·1 answer
  • 3. What is the mechanical advantage of the pulley system shown below? HII TAI 190 O A1 O E.2 OC.3 OD 4​
    10·1 answer
  • What is the answer of this question please tell me <br><br>dadada please please​
    10·1 answer
  • What energy does a curcuit board run on
    11·2 answers
  • In which of the following states would homes most likely have the deepest foundation?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!