Add solution to problem 10959 from UVa using a BFS algorithm (C code).