CLRS Implementation in C++ templates.