Standard algorithmic codes in C++