(a) (9 points) Given an undirected graph G = (V,E), where V = {u1,...um} (m > 0) and E = {e1,...,en) (n > 0), devise an algorithm to check if the graph G is a tree or not by using UNION(ui,uj) with union-by-height and FIND(uk) with no path com pression, where Ui,Us and Uk
V. Clearly describe your solution and analyze the tinre cumplexity of your algorithm in the worst case. No code is required (code will not be graded).