C++ Implementations of Some Algorithms