Kargers minimum cut algorithm working