union-find lectures examples