[Coursera][Algorithms] assignment for week 5