Add QuickUnionUF
Replace while loop with recursive call