bangash110-avatar

Implement the problem of 2D Maxima in java?

I want the java program(source code).
0%

8 replies

over 5 years ago
Monkeym-avatar
x1 solhoyld Be congruent
over 5 years ago
erickson-balanga-avatar
An element is a peak element if it is greater than or equal to its four neighbors, left, right, top and bottom. For example neighbors for A[i][j] are A[i-1][j], A[i+1][j], A[i][j-1] and A[i][j+1]. For corner elements, missing neighbors are considered of negative infinite value. Examples: Input : 10 20 15 21 30 14 7 16 32 Output : 30
30 is a peak element because all its
neighbors are smaller or equal to it.
32 can also be picked as a peak. Input : 10 7
11 17
Output : 17
100%