Algorithms written in C++