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
Which option distinguishes the step in the engineering design phase described in the following scenario?
rewona [7]

Answer:

reasearching the problem

Explanation:

EDG

7 0
3 years ago
Two stepped bar is supported at both ends.At the join point of two segments,the force F is applied(downwards).Calculate reactive
nlexa [21]

Answer:

F=200kN

Explanation:

8 0
3 years ago
The first thing you should do is develop a ____________________ to determine what vehicle you can afford.
swat32

The first thing you should do is develop a <u>budget</u> to determine what vehicle you can afford.

<h3>What is an automobile?</h3>

An automobile is also referred to as a vehicle, car or motorcar and it can be defined as a four-wheeled vehicle that is designed and developed to be propelled by an internal-combustion (gasoline) engine, especially for the purpose of transportation from one location to another.

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

A budget can be defined as a financial plan that is typically used for the estimation of revenue and expenditures of an individual, business organization or government for a specified period of time, often one year.

In this context, we can reasonably infer and logically deduce that the first thing anyone should do is to develop a <u>budget</u> in order to determine what vehicle they can afford.

Read more on budget here: brainly.com/question/13964173

#SPJ1

7 0
1 year ago
Why is it important to use the proper line types? ( In five sentences) pls i need help!! #enginering
Tanya [424]
Communication-each have different meanings because when you use the proper paper lines it will help you when you are older and now also it will help you in your drawing technique.(This question can help hope you will understand)
5 0
3 years ago
A horizontal channel of height H has two fluids of different viscosities and densities flowing because of a pressure gradient dp
cricket20 [7]

Answer:

Given that;

Jello there, see explanstion for step by step solving.

A horizontal channel of height H has two fluids of different viscosities and densities flowing because of a pressure gradient dp/dx1. Find the velocity profiles of two fluids if the height of the flat interface is ha.

Explanation:

A horizontal channel of height H has two fluids of different viscosities and densities flowing because of a pressure gradient dp/dx1. Find the velocity profiles of two fluids if the height of the flat interface is ha.

See attachment for more clearity

6 0
3 years ago
Other questions:
  • Calculate the angle of banking on a bend of 100m radius so that vehicles can travel round the bend at 50km/hr without side thrus
    12·1 answer
  • A gear train has two gears. The driver gear has 8 teeth and a diametral pitch of 6 teeth/inch. the follower gear has 24 teeth. W
    13·1 answer
  • Block B starts from rest and moves downward with a constant acceleration. Knowing that after slider block A has moved 400 mm its
    13·1 answer
  • At a certain location, wind is blowing steadily at 5 mph. Suppose that the mass density of air is 0.0796 lbm/ft3 and determine t
    6·1 answer
  • Tell me a riddle and whoevers i like best gets brainliest
    6·1 answer
  • Select the correct answer.
    6·1 answer
  • What year did Vidal Sassoon come to America ?
    7·2 answers
  • Hi, everyone I'm a high school student in Texas. My engineering teacher is asking us to find an active engineer to complete a li
    5·1 answer
  • Storing parts outside doesn’t cause any environmental risks as long as the items are covered.
    12·1 answer
  • Is bed sheets of cotton a composite material, a organic material, a inorganic material, or a malleability material?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!