Implementation of basic algorithms written in C++