Commonly used algorithms implemented in C