Academical implementation of Karger's Algorithm in O(mα(n) + n) and Karger-Stein algorithm in O((mα(n) + n) log(n)) using the Union-Find data structure.