C program to find maximum and minimum element in 2d array. The path can end at any element of last row.