I am working on a union-find algorithm, using the following : HashMap<E,E> parent = new HashMap<E,E>(); I have written this method to find the last member of a family public E find(E src) { while (parent.get(src) != null) src = parent.get(src); return src; } It works, but the thing is that I am going to […]
The post Union-Find using Hashmap in Java appeared first on BlogoSfera.