Skip to content

Instantly share code, notes, and snippets.

@ShellBin
Last active September 17, 2018 14:11
Show Gist options
  • Save ShellBin/148d18c3188b79fbcd9718023556e055 to your computer and use it in GitHub Desktop.
Save ShellBin/148d18c3188b79fbcd9718023556e055 to your computer and use it in GitHub Desktop.
row
public static boolean Row(int [][] value){
//row
int countRow =0;
for(int i=0;i<value.length;i++)
{
countRow = 1;
for(int j=1;j<value[i].length;j++)
{
if(value[i][j] == value[i][j-1])
countRow++;
else
countRow = 1;
if(countRow == 2)
return true;
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment