Implementation of coursera classes algorithms