[+] minimum spanning tree
[*] maximum flow refactoring