Solution to Problem 1.10 / Implementation of Algorithm 1.8
Author: Ryan McIntyre
