Graph Theory37 sections · 1633 units
Open in Course

Quiz: Include/Exclude Pattern

Knowledge check

Check Your Understanding

House Robber III: Max sum of non-adjacent nodes in a tree. You define dp[v][0] = not robbing vv, dp[v][1] = robbing vv. If you rob vv, what constraint applies to children?

  1. A.Cannot rob any child (they're adjacent to vv)
  2. B.Can rob exactly one child
  3. C.Must rob all children too
  4. D.No constraint on children
Start the roadmap to answer the quizzes and solve the challenges