added implementations of brute force union and weighted union