Creating two weighted Quick union arrays