CLRS Implementation using C++ templates.