Graph Theory37 sections · 1633 units
Open in Course

Quiz: Finding the Centroid

Knowledge check

Check Your Understanding

To find the centroid of a tree, you compute subtree sizes and walk toward the heaviest subtree. When do you stop?

  1. A.When you reach a leaf node
  2. B.When the current node has the smallest subtree size
  3. C.When you have visited all nodes
  4. D.When no adjacent subtree has more than n/2\lfloor n/2 \rfloor nodes
Start the roadmap to answer the quizzes and solve the challenges