Update algorithm.c