11 of 18
MIT
Algorithm
l
Compute leftmost cut (vertex degree)
l
Dynamic program left to right
l
Each edge counts twice
l
Total:
O(m+n)
l
No data structures