Union find

Ease to create new implementations for Union Find.