Code Written for CourseEra Course: Algorithms: Design and Analysis, Part 1