Graph Theory37 sections · 1633 units
Open in CourseQuiz: Offline Processing
Knowledge check
Check Your Understanding
You have queries asking "are and connected using only edges with weight ?" You sort edges by weight and queries by their weight limit. Why does this approach work?
- A.Because DSU operations are commutative, so order does not matter
- B.Because DSU automatically tracks edge weights
- C.Because sorting lets you add edges incrementally and answer each query at the right moment
- D.Because queries with smaller weight limits always return false