Implementation of Algorithms in C++