Removed unused variable in algorithm.cpp