Added algorithm solving problem 1 with commentary.