Python Implementation of David Karger's Graph Minimum Cut Algorithm OOP and Functional Implementations