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
The electricity generated by wind turbines annually in kilowatt-hours per year is given in a file. The amount of electricity is
Anika [276]

Answer:

Steps:

1. Create a text file that contains blade diameter (in feet), wind velocity (in mph) and the approximate electricity generated for the year

2.  load the data file for example, in matlab, use ('fileame.txt') to load the file

3. create variables from each column of your data

  for example, in matlab,  

     x=t{1}

     y=t{2}

4. plot the wind velocity and electricity generated.

   plot(x, y)

5. Label the individual axis and name the graph title.

    title('Graph of wind velocity vs approximate electricity generated for the year')

     xlabel('wind velocity')

     ylabel('approximate electricity generated for the year')

5 0
3 years ago
Read 2 more answers
In a production turning operation, the foreman has decreed that a single pass must be completed on the cylindrical workpiece in
stellarik [79]

Answer:

V = 125.7m/min

Explanation:

Given:

L = 400 mm ≈ 0.4m

D = 150 mm ≈ 0.15m

T = 5 minutes

F = 0.30mm ≈ 0.0003m

To calculate the cutting speed, let's use the formula :

T = \frac{pi* D * L}{V*F}

We are to find the speed, V. Let's make it the subject.

V = \frac{pi* D * L}{F*T}

Substituting values we have:

V = \frac{pi* 0.4 * 0.15}{0.0003*5}

V = 125.68 m/min ≈ 125.7 m/min

Therefore, V = 125.7m/min

7 0
3 years ago
A(n) _____________ is used commonly in open split-phase motors to disconnect the start winding from the electrical circuit when
Alenkasestr [34]

A <u>centrifugal switch</u> is used commonly in open split-phase motors to disconnect the start winding from the electrical circuit when the motor reaches approximately 75% of its rated speed.

Hope that helps!

7 0
2 years ago
Do the coil resistances have any effect on the plots?
PolarNik [594]
Because of the skin depth effect, the current at high frequency tends to flow at very low depth from radius. Then at high frequency the effective cross section of the wire is narrower than at DC.

Fro example skin depth at 100 kHz is 0.206 mm (0.008”), a wire more thicker than AWG26 could be a waste of copper, better use a bunch of thin wire (Litz wire) to rise the Q factor.
8 0
3 years ago
The Stefan-Boltzmann law can be employed to estimate the rate of radiation of energy H from a surface, as in
Mazyrski [523]

Explanation:

A.

H = Aeσ^4

Using the stefan Boltzmann law

When we differentiate

dH/dT = 4AeσT³

dH/dT = 4(0.15)(0.9)(5.67)(10^-8)(650)³

= 8.4085

Exact error = 8.4085x20

= 168.17

H(650) = 0.15(0.9)(5.67)(10^-8)(650)⁴

= 1366.376watts

B.

Verifying values

H(T+ΔT) = 0.15(0.9)(5.67)(10)^-8(670)⁴

= 1542.468

H(T+ΔT) = 0.15(0.9)(5.67)(10^-8)(630)⁴

= 1205.8104

Error = 1542.468-1205.8104/2

= 168.329

ΔT = 40

H(T+ΔT) = 0.15(0.9)(5.67)(10)^-8(690)⁴

= 1735.05

H(T-ΔT) = 0.15(0.9)(5.67)(10^-8)(610)⁴

= 1735.05-1059.83/2

= 675.22/2

= 337.61

5 0
3 years ago
Other questions:
  • A computer has a two-level cache. Suppose that 60% of the memory references hit on the first level cache, 35% hit on the second
    12·1 answer
  • Electrical strain gauges were applied to a notched specimen to determine the stresses in the notch. The results were εx=0.0019 a
    13·1 answer
  • A well-insulated tank in a vapor power plant operates at steady state. Saturated liquid water enters at inlet 1 at a rate of 125
    8·1 answer
  • Michelle is the general manager of a power plant. This morning, she will meet with city officials to discuss environmental issue
    5·1 answer
  • A pool of contaminated water is lined with a 40 cm thick containment barrier. The contaminant in the pit has a concentration of
    11·1 answer
  • Find the general solution of the equation<br>a) Tan A = 1/√3​
    11·1 answer
  • Can someone please help me with this <br>I've an exams tomorrow ​
    7·1 answer
  • Hello, so I have a watch and I don't know where the plugin for the charger is, or what brand it is. Please do help and please DO
    11·1 answer
  • Alguém para conversa
    13·1 answer
  • ​please how to drawing mechanical drawing after connecting the all parts thanks
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!