Quick Union and Quick Weighted Quick Union algorithms were implemented