C++ AlgotithmExecise