MST heuristic, using hashmap to store mst values
merge