C, C++ AlgorithmExm