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
A formal indication from a state, on letterhead, or an official state form, that shows the applicant has valid driving privilege
alex41 [277]

A formal indication from a state, on letterhead, or an official state form, which shows that an applicant has valid driving privileges and is clear to apply for a Colorado driver's license is called a clearance.

<h3>What is a learner's license?</h3>

A learner's license is also referred to as learner's permit and it can be defined as a category of driver's license that is issued to an individual who is learning how to drive an automobile vehicle (car).

<h3>What is a license?</h3>

A license is also referred to as a certificate and it can be defined as an authorization that is typically issued by state governments to a driver, so as to avail him or her the legal ability to physically driver in all the states across a country.

In this scenario, we can infer and logically deduce that a clearance is a formal indication from a state which shows and affirms that an applicant has valid driving privileges, and is permitted to apply for a Colorado driver's license.

Learn more about learner's license here: brainly.com/question/26289148

#SPJ1

7 0
1 year ago
what is the relationship between magnetism and electromagnetism and how does this effect voltage in a circuit?
RideAnS [48]

Answer:

A magnetic field of changing intensity perpendicular to a wire will induce a voltage along the length of that wire. The amount of voltage induced depends on the rate of change of the magnetic field flux and the number of turns of wire (if coiled) exposed to the change in flux.

Please mark Brainliest!

3 0
2 years ago
Two vertical, parallel clean glass plates are spaced a distance of 2mm apart. if the plates are placed in water, how high will t
Ulleksa [173]

Answer with Explanation:

The capillary rise in 2 parallel plates immersed in a liquid is given by the formula

h=\frac{2\sigma cos(\alpha )}{\rho gd}

where

\sigma is the surface tension of the liquid

\alpha is the contact angle of the liquid

\rho is density of liquid

'g' is acceleratioj due to gravity

'd' is seperation between thje plates

Part a) When the liquid is water:

For water and glass we have

\sigma =7.28\times 10^{-2}N/m

\alpha =0

\rho _{w}=1000kg/m^3

Applying the values we get

h=\frac{2\times 7.28\times 10^{-2}cos(0)}{1000\times 9.81\times 2\times 10^{-3}}=7.39mm

Part b) When the liquid is mercury:

For mercury and glass we have

\sigma =485.5\times 10^{-3}N/m

\alpha =138^o

\rho _{w}=13.6\times 10^{3}kg/m^3

Applying the values we get

h=\frac{2\times 485.5\times 10^{-3}cos(138)}{13.6\times 1000\times 9.81\times 2\times 10^{-3}}=-2.704mm

The negative sign indicates that there is depression in mercury in the tube.

4 0
3 years ago
Adam has 5 barrels of different volumes. The barrel of which volume can contain the most liquid?
Natalija [7]

Answer:

D

Explanation:

5 0
2 years ago
Transmission cleaners are used: A) Only in conjunction with fuel system cleanersB) Only in the colder monthsC) By themselvesD) I
valentina_108 [34]

Answer: D

Explanation: When you change your transmission fluid you change your filter. When you do that you clean where the filter was. Then you can put the new filter on and the new fluid.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Estimate the daily carbon utilization to remove chlorobenzene from 1.0 MGD of ground water saturated with chlorobenzene. Assume
    12·1 answer
  • Which allows a user to run applications on a computing device? Group of answer choices Application software CSS Operating system
    11·1 answer
  • In your opinion, what is the external opportunity cost of a successful biking company in a community
    7·1 answer
  • You want to plate a steel part having a surface area of 160 with a 0.002--thick layer of lead. The atomic mass of lead is 207.19
    15·1 answer
  • What process is used to remove collodal and dissolved organic matter in waste water ​
    10·1 answer
  • 15 POINTS! Help.
    9·2 answers
  • Based on the following passage, why might the government use the U.S. Army Corps of Engineers to undertake hydroelectric power p
    14·1 answer
  • a coil consists of 200 turns of copper wire and has a cross-sectional area of 0.8mm square . The mean length per turn is 80 cm a
    5·1 answer
  • How much horse power does a Lamborghini have
    6·2 answers
  • A TV USE 75 WATTS WHILE IN USED ASSMING THAT ITIS USED 4 HOURS EVERY DAY HOW MUCH ENERGY IN 4 IN KWH WOULD THE TV CONSUME ANNUAL
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!