min cut excercise with unit tests.