Graph Theory37 sections · 1633 units
Open in Course

Quiz: Offline Processing

Knowledge check

Check Your Understanding

You have queries asking "are uu and vv connected using only edges with weight w\leq w?" You sort edges by weight and queries by their weight limit. Why does this approach work?

  1. A.Because DSU operations are commutative, so order does not matter
  2. B.Because DSU automatically tracks edge weights
  3. C.Because sorting lets you add edges incrementally and answer each query at the right moment
  4. D.Because queries with smaller weight limits always return false
Start the roadmap to answer the quizzes and solve the challenges