algo3: reviewed Karger minimum cut algorithm