The algoritmhs 1 from Coursera