Weighted quick-union tested and implemented