Problem 001: Provided C implementation of optimal solution for problem 001