For project in Advance Algorithms KTH.