Random Contraction Algorithm to find min cut