Architecting the classes to solve the mincut prob