This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PlusPattern { | |
/** | |
* Utility method to verify matrix dimensions | |
* | |
* @param a matrix to be verified | |
* @return true if matrix size is greater than 0; | |
*/ | |
private static boolean isValid(int[][] a) { | |
return a.length > 0 && a[0].length > 0; |