Algorithms written for Udacity Algorithm course