add algorithm.c,has some bug