Weighted Quick Union and Path Compression