Talk:Stoer–Wagner algorithm
Appearance
This article contains two sample implementations. The first one is C++, contains a reference, and appears to work.
I can't get the second one to work. First, I can't tell for sure what language it is. It mostly looks like C, but the code uses C++ reference syntax in one place:
int contract( int &s, int &t )
Even after changing the references to pointers, I couldn't get a sensible answer.
Finally, will memset(bin, false, sizeof(bin)); clear the entire array, or is
memset(bin, false, sizeof(bool)*maxn);
correct?