Popular algorithms implemented in C++