Add the correct Karger algorithm on java