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
Alexus [3.1K]
3 years ago
15

typedef struct bitNode { int data; struct bitNode *left; struct bstNode *right; } bstNode; int solve(bstNode* root) { if (root =

= NULL) return 0; int res = root->data; int left = solve(root→left); int right = solve(root->right); if (left+right > res) res = left+right; printf("%d,", res); return res; }_____ , _____ , _____ , _____ ,_____ , _____ , _____ , _____ , _____ , _____
Engineering
1 answer:
Sergio039 [100]3 years ago
4 0

Answer:

The ten numbers to be filled in the blanks are: 18, 7, 7, 11, 18, 36, 3, 8, 13, 50.

Explanation:

keeps on going to the left node until node->left == NULL;

now at Node 18;

left = right = 0; hence condition is not satisfied

18 is printed first.

the value 18 is returned .

Then we reach at 4;

from there we move to 7;

just like 18, similar things happen with 7 and 7 is printed, the value 7 is returned.

Now coming to Node 4,

left = 0, right = 7 ; hence the condition is satisfied & res = 7; 7 is printed.

For Node 16, left = 7 ; right = 11(but for this we visit 11 first and 11 is printed)

for 16; condition is satisfied; res = 7 + 11 = 18 ; 18 is printed

Now for 5; left = right = 18; the condition is satisfied; so res = 18 + 18 = 36; 36 is printed

Next we visit Node 3; 3 is printed & 3 is returned

Then Node 8 ; 8 is printed & 8 is returned

for Node 13; left = 3, right = 8 ; condition is not satisfied, 13 is printed.

For Node 50; left = 36 right = 13 ; condition is not satisfied hence 50 is printed.

So the order of printing is  18 7 7 11 18 36 3 8 13 50.

You might be interested in
Two engineers are to solve an actual heat transfer problem in a manufacturing facility. Engineer A makes the necessary simplifyi
deff fn [24]

Answer:

Engineer A results will be more accurate

Explanation:

Analytical method is better than numerical method. Engineer A has used analytical method and therefore his results will be more accurate because he used simplified method. Engineer B has used software to solve the problem related to heat transfer his results will be approximate.

5 0
3 years ago
What is an example of a class 2 lever?
9966 [12]

Answer:

A wheelbarrow, a bottle opener, and an oar are examples of second class levers

6 0
3 years ago
Read 2 more answers
An air-standard Diesel cycle engine operates as follows: The temperatures at the beginning and end of the compression stroke are
Vika [28.1K]

This question is incomplete, the complete question is;

An air-standard Diesel cycle engine operates as follows: The temperatures at the beginning and end of the compression stroke are 30 °C and 700 °C, respectively. The net work per cycle is 590.1 kJ/kg, and the heat transfer input per cycle is 925 kJ/kg. Determine the a) compression ratio, b) maximum temperature of the cycle, and c) the cutoff ratio, v3/v2.

Use the cold air standard assumptions.

Answer:

a) The compression ratio is 18.48

b) The maximum temperature of the cycle is 1893.4 K

c) The cutoff ratio, v₃/v₂ is 1.946

Explanation:

Given the data in the question;

Temperature at the start of a compression T₁ = 30°C = (30 + 273) = 303 K

Temperature at the end of a compression T₂ = 700°C = (700 + 273) = 973 K

Net work per cycle W_{net = 590.1 kJ/kg

Heat transfer input per cycle Qs = 925 kJ/kg

a) compression ratio;

As illustrated in the diagram below, 1 - 2 is adiabatic compression;

so,

Tγ^{Y-1 = constant { For Air, γ = 1.4 }

hence;

⇒ V₁ / V₂ = ( T₂ / T₁ )^{\frac{1}{Y-1}

so we substitute

⇒ V₁ / V₂ = (  973 K / 303 K  )^{\frac{1}{1.4-1}

= (  3.21122  )^{\frac{1}{0.4}

= 18.4788 ≈ 18.48

Therefore, The compression ratio is 18.48

b) maximum temperature of the cycle

We know that for Air, Cp = 1.005 kJ/kgK

Now,

Heat transfer input per cycle Qs = Cp( T₃ - T₂ )

we substitute

925 = 1.005( T₃ - 700 )

( T₃ - 700 ) = 925 / 1.005

( T₃ - 700 ) = 920.398

T₃ = 920.398 + 700

T₃ = 1620.398 °C

T₃ = ( 1620.398 + 273 ) K

T₃ = 1893.396 K ≈ 1893.4 K

Therefore, The maximum temperature of the cycle is 1893.4 K

c)  the cutoff ratio, v₃/v₂;

Since pressure is constant, V ∝ T

So,

cutoff ratio S = v₃ / v₂  = T₃ / T₂

we substitute

cutoff ratio S = 1893.396 K / 973 K

cutoff ratio S = 1.9459 ≈ 1.946

Therefore, the cutoff ratio, v₃/v₂ is 1.946

8 0
3 years ago
After reading through the code, what will happen when you click run?* 1 point when run move forward while there is a pile do rem
KATRIN_1 [288]

Explanation:

I'm not exactly a master at coding, but I'm pretty sure that:

The farmer will remove dirt as long as there is a pile, then stop when the pile is done.

5 0
2 years ago
The uniform slender rod has a mass m.
Nikolay [14]

Answer: 3/2mg

Explanation:

Express the moment equation about point B

MB = (M K)B

-mg cosθ (L/6) = m[α(L/6)](L/6) – (1/12mL^2 )α

α = 3g/2L cosθ

express the force equation along n and t axes.

Ft = m (aG)t

mg cosθ – Bt = m [(3g/2L cos) (L/6)]

Bt = ¾ mg cosθ

Fn = m (aG)n

Bn -mgsinθ = m[ω^2 (L/6)]

Bn =1/6 mω^2 L + mgsinθ

Calculate the angular velocity of the rod

ω = √(3g/L sinθ)

when θ = 90°, calculate the values of Bt and Bn

Bt =3/4 mg cos90°

= 0

Bn =1/6m (3g/L)(L) + mg sin (9o°)

= 3/2mg

Hence, the reactive force at A is,

FA = √(02 +(3/2mg)^2

= 3/2 mg

The magnitude of the reactive force exerted on it by pin B when θ = 90° is 3/2mg

6 0
3 years ago
Other questions:
  • Where the velocity is highest in the radial direction? Why?
    9·1 answer
  • What is the ILS stand for
    8·2 answers
  • A water jet strikes normal to a fixed plate. If diameter of the outlet of the nozzle is 8 cm,and velocity of water at the outlet
    11·1 answer
  • . H<br> Kijwhayhwbbwyhwbwbwgwwgbwbwhwh
    6·2 answers
  • What Number Am I?
    13·1 answer
  • What is a chipping hammer used for? <br><br> State three things.
    7·2 answers
  • Write a Nested While Loop that will increment the '*' from 1 to 10.
    6·1 answer
  • What is a transition? A. An animation that happens on a single slide B. An outline format that uses roman numerals C. An image f
    10·1 answer
  • Name eight safety electrical devices including their functions and effects if not present.​
    15·1 answer
  • with a digital system, if you have measured incorrectly and use too low of a kvp for adequate penetration, what do you need to d
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!