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 that O(NQ)?
Number of connected components with queries
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 that O(NQ)?
| Rev. | Lang. | By | When | Δ | Comment | |
|---|---|---|---|---|---|---|
| en4 |
|
Is1500EnoughForEGOI | 2020-06-01 00:13:03 | 2 | Tiny change: 'lution that O(NQ)?' -> 'lution than O(NQ)?' | |
| en3 |
|
Is1500EnoughForEGOI | 2020-05-31 22:43:54 | 0 | (published) | |
| en2 |
|
Is1500EnoughForEGOI | 2020-05-31 22:43:45 | 6 | (saved to drafts) | |
| en1 |
|
Is1500EnoughForEGOI | 2020-05-31 22:43:06 | 256 | Initial revision (published) |