Finding "Stars" using Max Spanning Trees and a UnionFind Data Structure