subject
Mathematics, 31.05.2021 14:30 ethannila

Consider the following problem: You are given a pointer to the root r of a binary tree, where each vertex v has pointers v. lc and v. rc to the left and right child, and a value Val (v) >0. The value NIL represents a null pointer, showing that v has no child of that type. You wish to find the maximum total sum of vertices of a subset with the following constraints: If v is in the subset, then the following vertices cannot be in the subset: The parent of v
The children of v
The sibling of v (the other vertex that shares the same parent as v)

(You can assume that the tree is a full balanced binary tree with n vertices where n= 2^k -1) for some K>=1

ansver
Answers: 1

Another question on Mathematics

question
Mathematics, 21.06.2019 19:40
Afactory makes propeller drive shafts for ships. a quality assurance engineer at the factory needs to estimate the true mean length of the shafts. she randomly selects four drive shafts made at the factory, measures their lengths, and finds their sample mean to be 1000 mm. the lengths are known to follow a normal distribution whose standard deviation is 2 mm. calculate a 95% confidence interval for the true mean length of the shafts. input your answers for the margin of error, lower bound, and upper bound.
Answers: 3
question
Mathematics, 21.06.2019 20:00
Write the point-slope form of the line passing through (2, -12) and parallel to y=3x.
Answers: 2
question
Mathematics, 21.06.2019 20:30
Asunflower was 20 1/2 inches tall. over the next 6 months, it grew to a height of 37 inches tall. what was the average yearly growth rate of the height of the plzzz write a proportion i will give you 100 points
Answers: 1
question
Mathematics, 22.06.2019 02:00
Ethan is proving that the slope between any two points on a straight line is the same. he has already proved that triangles 1 and 2 are similar. drag statements and reasons to complete the proof.
Answers: 1
You know the right answer?
Consider the following problem: You are given a pointer to the root r of a binary tree, where each v...
Questions
Questions on the website: 13722360