0

Ho i do it?

A mat matrix of size n * n is represented by a two-dimensional array. The matrix contains only integers. We assume that the quadratic matrix is ​​an odd order. We will say that the matrix is ​​sorted if the division of the matrix into four quarters is smaller or equal to each organ in the second quarter, each organ in the second quarter is smaller or equal to each organ in the third quarter, and each organ in the third quarter is smaller or equal to each organ in the fourth quarter. The most efficient method of writing returns a true value if only if the value x is in a matrix (the statistic is that the matrix is ​​sorted and therefore there is no need to check it) method name: public static Boolean find [int [] [], int x)

10th May 2017, 1:04 PM
yossi Nahmias
1 Réponse
+ 5
Just do it
10th May 2017, 1:27 PM
NimWing Yuan
NimWing Yuan - avatar