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
A large particle composite consisting of tungsten particles within a copper matrix is to be prepared. If the volume fractions of
OverLord2011 [107]

Answer:

Upper bounds 22.07 GPa

Lower bounds 17.59 GPa

Explanation:

Calculation to estimate the upper and lower bounds of the modulus of this composite.

First step is to calculate the maximum modulus for the combined material using this formula

Modulus of Elasticity for mixture

E= EcuVcu+EwVw

Let pug in the formula

E =( 110 x 0.40)+ (407 x 0.60)

E=44+244.2 GPa

E=288.2GPa

Second step is to calculate the combined specific gravity using this formula

p= pcuVcu+pwTw

Let plug in the formula

p = (19.3 x 0.40) + (8.9 x 0.60)

p=7.72+5.34

p=13.06

Now let calculate the UPPER BOUNDS and the LOWER BOUNDS of the Specific stiffness

UPPER BOUNDS

Using this formula

Upper bounds=E/p

Let plug in the formula

Upper bounds=288.2/13.06

Upper bounds=22.07 GPa

LOWER BOUNDS

Using this formula

Lower bounds=EcuVcu/pcu+EwVw/pw

Let plug in the formula

Lower bounds =( 110 x 0.40)/8.9+ (407 x 0.60)/19.3

Lower bounds=(44/8.9)+(244.2/19.3)

Lower bounds=4.94+12.65

Lower bounds=17.59 GPa

Therefore the Estimated upper and lower bounds of the modulus of this composite will be:

Upper bounds 22.07 GPa

Lower bounds 17.59 GPa

7 0
2 years ago
Can you answer what is attached.
kirill [66]
29.4 bro I hope that helps
3 0
3 years ago
Briefly describe an idea for a new product, (which can be anything) while thinking made me about it cost analysis. Depict what k
larisa86 [58]

Answer:

A transforming vechicle that could transform from a land-based vehicle to a water-based vehicle and to an air based vehicle.

Explanation:

7 0
2 years ago
What is the voltage output (in V) of a transformer used for rechargeable flashlight batteries, if its primary has 515 turns, its
kow [346]
<h2>Answer:</h2>

7532V

<h2>Explanation:</h2>

For a given transformer, the ratio of the number of turns in its primary coil (N_{p}) to the number of turns in its secondary coil (N_{s}) is equal to the ratio of the input voltage (V_{p}) to the output voltage (V_{s}) of the transformer. i.e

\frac{N_p}{N_s} = \frac{V_p}{V_s}            ----------------(i)

<em>From the question;</em>

N_{p} = number of turns in the primary coil = 8 turns

N_{s} = number of turns in the secondary coil = 515 turns

V_{p} = input voltage = 117V

<em>Substitute these values into equation (i) as follows;</em>

\frac{8}{515} = \frac{117}{V_s}

<em>Solve for </em>V_{s}<em>;</em>

V_{s} = 117 x 515 / 8

V_{s} = 7532V

Therefore, the output voltage (in V) of the transformer is 7532

6 0
3 years ago
Jump starting a car requires _____.
maria [59]

Answer:

D

Explanation:  you need a jump cable to hook on a power source because the jump cable has two color cables to hook up to the power source. the two jump cables have two colors to tell you which one is positive and negative. The red one is the positive and the black on is the negative one.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Explicar el funcionamiento de un multímetro analógico.
    7·1 answer
  • Two mass streams of the same ideal gas are mixed in a steady-flow chamber while receiving energy by heat transfer from the surro
    11·1 answer
  • In this lab, your task is to configure the external vEthernet network adapter with the following IPv6 address: Prefix: 2620:14F0
    14·1 answer
  • Steam enters a nozzle at 400°C and 800 kPa with a velocity of 10 m/s and leaves at 375°C and 400 kPa while losing heat at a rate
    7·1 answer
  • Safety-in engineering as with everything else is all about trying to maximize or create the hazards involved with what you are d
    6·2 answers
  • Solve the inequality below.Use the drop-down menus to describe the solution and its graph.
    12·1 answer
  • Explain the problems and their possible solution for electricity problems ?​
    8·1 answer
  • GOOD AFTERNOON GUYSS!! ​
    15·2 answers
  • Why is personal development necessary based activity success life and career​
    11·1 answer
  • Match the measuring instrument with its description.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!