Backing code as I work through Algorithms book