Done in python for Algorithms course.