Algorithms in C