Pergunta de entrevista da empresa Google

Write code to check the validity of a suduko square

Resposta da entrevista

Sigiloso

17 de jan. de 2011

boolean checkSudoku(int[][] a, int n) { int s1, s2, s3; for(int i = 0; i 0) return false; s1 |= a[i][j]; s2 |= a[j][i]; s3 |= a[i%n][j%n]; } } return true; }