Graph Theory37 sections · 1633 units
Open in Course

Quiz: Rerooting Answer

Knowledge check

Check Your Understanding

You already computed downdown for each child and up[u]. Which formula gives the correct answer for node uu in the *max balance* rerooting problem?

  1. A.ans[u] = Σ down[child] + up[u]
  2. B.ans[u] = color[u] + max(0, up[u]) + Σ max(0, down[child])
  3. C.ans[u] = max down[child] + up[u]
  4. D.ans[u] = color[u] + Σ down[child]
Start the roadmap to answer the quizzes and solve the challenges