Assignment for week 2 in algorithms course