add some algorithms from coursera algorithm