Implement algorithms in C language.