Update algorithm.cpp

Did I commit before?