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]
4 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]4 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
Consider a system whose temperature is 18°C. Express this temperature in R, K, and °F.
zvonat [6]

Answer:

In Rankine 524.07°R

In kelvin 291 K

In Fahrenheit 64.4°F  

Explanation:

We have given temperature 18°C

We have to convert this into Rankine R

From Celsius to Rankine we know that  T(R)=(T_{C}+273.15)\frac{9}{5}

We have to convert 18°C

So T(R)=(18+273.15)\frac{9}{5}=524.07^{\circ}R

Conversion from Celsius to kelvin

T(K)=(T_{C}+273)

We have to convert 18°C

T(K)=(18+273)=291K

Conversion of Celsius to Fahrenheit

T(F)=T_{C}\times \frac{9}{5}+32=64.4^{\circ}F

7 0
3 years ago
Consider 4.8 pounds per minute of water vapor at 100 lbf/in2, 500 oF, and a velocity of 100 ft/s entering a nozzle operating at
andriy [413]

Answer:

A) v_2 = 2016.80 ft/s

B) \Delta s = 0.006 Btu/lbm R  

Explanation:

Given data:

P-1 = 100 lbf/in^2

T_1 = 500 degree f

V_1 = 100 ft/s

P_2 = 40 lbf/inc^2

effeciency = 80%

from steady flow enerfy equation

h_1 +\frac{V_1^2}{2} = h_2 + \frac{V_2^2}{2}

where h1 and h2 are inlet and exit enthalpy

for P1 = 100 lbf/in^2 and T1 = 500 degree F

H_1 = 1278.8 Btu/lbm

s_1 = 1.708 Btu/lbm -R

for P1 = 40 lbf/in^2

H_1 = 1193.5 Btu/lbm

s_1 = 1.708 Btu/lbm -R

exit enthalapy h_2

\eta = \frac{h_1 - h'_2}{ h_1 - h_2}

0.80 = \frac{1278.8 - h'_2}{1278.8 -1193.5} = 1197.77 Btu/lbm

from above equation

1278.8 \times 25037 + \frac{100^2}{2} = 1197.77   \times 25037 + \frac{v_2^2}{2}                   [1 Btu/lbm = 25037 ft^2/s^2]

v_2 = 2016.80 ft/s

b) amount of entropy

\Delta s = s_2 - s_1

s_1 = 1.708 Btu/lbm -R

at h_2 = 1197.77 Btu/lbm [\tex]  and [tex]P_2 = 40 lbf/in^2

s_2 is 1.714 Btu/lbm -R

\Delta s = 1.714 - 1.708 = 0.006 Btu/lbm R

6 0
3 years ago
A hospitality organization wants to clear an area of forestland to start a new hotel. The environmental activists have filed a c
o-na [289]

Answer:

B. Public

Explanation:

A ____________ is any group that has an actual or potential interest in or impact on an organization's ability to achieve its objectives.

a. People

b. Public

c. Profile

d. Pro-association

4 0
3 years ago
A renewable item is something that is capable of being replaced naturally.
djverab [1.8K]
The answer is False.
6 0
4 years ago
Read 2 more answers
Thank you,Thank you udahfsdf
Degger [83]

Answer: Um, a little feedback would help, cause I'm new but if you are thanking someone, let me know and i'll thank them for you, any other questions?

Explanation:

3 0
3 years ago
Other questions:
  • Give an example of a model code.
    5·1 answer
  • Which statement best explains the underlined portion of the quote from the declaration of independence
    11·1 answer
  • Determine FBC , the magnitude of the force in member BC, using the method of sections. Assume for your calculations that each me
    7·1 answer
  • If the middle bend of a three-bend saddle is a 30-degree bend
    6·2 answers
  • The Republican National Committee publishes a monthly digest of information for Republicans called .
    15·1 answer
  • A resource has value, and people are willing to pay for it most likely because the resource is
    9·2 answers
  • B is to 10 as 7 is to 2 setting porption
    9·1 answer
  • Please help ASAP!!
    13·2 answers
  • How is engine power expressed?
    8·2 answers
  • Basic C++ For Loop I'm trying to learn. Replit tells me that the for in the forloop is an error, but I don't know what's wrong.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!