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]
2 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]2 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
Flip-flops are normally used for all of the following applications, except ________. logic gates data storage frequency division
SpyIntel [72]

Flip-flops are normally used for all of the following applications, except  logic gates.

<h3>What are Flip flops?</h3>

Flip flops are known to be tools that are used for counting. They come in different ranges.

Note that Flip flops are one that can be seen on counters, storage registers, and others and as such, Flip-flops are normally used for all of the following applications, except  logic gates.

Learn more about  Flip flops from

brainly.com/question/4237777

#SPJ1

6 0
1 year ago
A 2 in. diameter pipe supplying steam at 300°F is enclosed in a 1 ft square duct at 70°F. The outside of the duct is perfectly i
Shkiper50 [21]

Answer:

The value of heat transferred watt per foot length Q = 54.78 Watt per foot length.

Explanation:

Diameter of pipe = 2 in = 0.0508 m

Steam temperature T_{1} = 300 F  = 422.04 K

Duct temperature T_{2} = 70 F = 294.26 K

Emmisivity of surface 1 = 0.79

Emmisivity of surface 2 = 0.276

Net emmisivity of both surfaces ∈ = 0.25

Stefan volazman constant \sigma = 5.67 × 10^{-8} \frac{W}{m^{2} K^{4}  }

Heat transfer  per foot length is given by

Q = ∈ \sigma A ( T_{1}^{4} - T_{2} ^{4} ) ------ (1)

Put all the values in equation (1) , we get

Q = 0.25 × 5.67 × 10^{-8} × 3.14 × 0.0508 × 1 × ( 422.04^{4} - 294.26^{4} )

Q = 54.78 Watt per foot.

This is the value of heat transferred watt per foot length.

4 0
3 years ago
the increase of current when 15 V is applied to 10000ohm rheostat which is adjusted to 1000ohm value​
Anastasy [175]
Given data:
•) applied voltage = 15 V
•). Resistance = 1000 ohm

Required:
•). The magnitude of current= ?

•••••••••••••SOLUTION•••••••••••••

We can find the relation ship between current, voltage and resistance with the help of Ohms law.

According to ohms law;

V= IR.

Rearranging the above equation;

I= V/ R

Putt the values in the above equation; we get

I= 15V/ 1000ohm

I = 0.015 A( ampere)

••••••••••••••• CONCLUSION•••••••

The value of the current would be 0.15 ampere when Resistance is equal to 1000 and that of Voltage is equal to 15 V.
4 0
2 years ago
1. Which of the following will cause a spark knock?
zlopas [31]

Answer:

I couldn't find options for your question online, but I can give you an explanation so you can choose the correct option.

Explanation:

A spark knock is a form of unpredictable behavior that occurs in combustion, that is, in the chemical reaction that occurs between oxygen and an oxidizable material. Such combustion is usually manifested by incandescence or flame.

The spark knock is a detonation that occurs when there is a lot of pressure in the fuel.

<u>Some situations in which this can happen are: </u>

  • Engine overloaded.
  • Maximum pressure in the cylinders.
  • Engine overheated.
  • Overheated air.
  • Long and excessive engine ignition timing.
  • Spark plug at high temperatures.
5 0
3 years ago
What’s is the proper fastener to use to join two wires.
xxMikexx [17]
The answer would be C !
7 0
3 years ago
Other questions:
  • 2. In the above figure, what type of cylinder arrangement is shown in the figure above?
    9·1 answer
  • Write a program to control the operation of the RED/GREEN/BLUE LED (LED2) as follows: 1. If no button is pressed, the LED should
    15·1 answer
  • What is 1000 kJ/sec in watts?
    10·1 answer
  • What is Differential Analysis in fluid mechanics?
    13·1 answer
  • For what two reasons do countries specialize? Countries specialize so that opportunity costs can be increased. Countries special
    13·1 answer
  • A plane wall of thickness 2L = 60 mm and thermal conductivity k= 5W/m.K experiences uniform volumetric heat generation at a rate
    9·1 answer
  • A proposed piping and pumping system has 20-psig static pressure, and the piping discharges to atmosphere 160 ft above the pump.
    8·1 answer
  • in the multiple pipe system shown below, which of the following is true concerning the linear system?.
    14·1 answer
  • 18. Bela is doing a continuity test. What's he checking?
    10·1 answer
  • Do better then me......................................
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!