min max algorithm divide and conquer in c