Algorithms from Jumping Into C++ textbook