C++ version of  Robert Sedgewick's Algorithms4 book