added algorithms.c
added algorithms.c