c++ and algorithmic thinking