Code written as part of the Algorithms1 class offered by Coursera. [Honor code complaint]