There is an undirected graph with n vertices and m edges. There have been three types of requests: to add an edge (X_i, y_i), remove the edge (X_i, y_i), and check whether or not vertices x_i and y_i connected.
I read this problem(disjoint set union division) in this site
http://e-maxx.ru/algo/sqrt_decomposition (this is in russian but i use google translate)
The approach is also given, they use disjoint sets with sqrt decomposition. I didn't understand this . plz help.