algorithm.cc