Finding minimum and maximum along rows and columns are correct