Centralized algorithm example implemented in C.