Algorithms in C++ Parts 1-4