implemented a correct version of the algorithm "Find local minimum in a
2D array".