updated cpp algorithm files