ANSWERS GRADED A+
◉ Worst case run time for path compression. Answer: Theta(n + f *
(1 + lg2 + f/n))
◉ Make-set worst case run time. Answer: Theta(1)
◉ Find-set worst case run time. Answer: Theta(1)
◉ Union worst case run time. Answer: Theta(n)
◉ When building disjoint sets, if there are n Make-Set operations and
m operations total, the worst case run time is. Answer: Theta(m + n lg
n)
◉ BFS worst case linked list. Answer: Theta(V + E)
◉ BFS worst case adjacency matrix. Answer: Theta(V^2)
◉ Make-Set algo. Answer: Make-Set(x){
x.p = x
x.rank =0