Added input to C++ algorithms