Is1500EnoughForEGOI's blog

By Is1500EnoughForEGOI, history, 4 years ago, In English

There is a graph with N vertices and two types of queries:

1) connect U and V

2) disconnect U and V

After each query, the number of connected components should be printed. Is there a better solution than O(NQ)?

Full text and comments »