Min cut problem
1. Removed recurrence of tail node in head's list
2. The compression loop carries on until only 2 vertices are remaining
3. Included function for counting the edges.