Amazon Interview Question

Justify the suduku

Interview Answers

Anonymous

Apr 7, 2012

oh, we need to use loops? that's very helpful.

Anonymous

Apr 12, 2012

the function can be like this(not tested): boolean test(byte[27][9] input) { for ( int i = 0; i < 27; i++) { short result = 0; for (int j=0; j<9; j++) { result |= 1<<(input[i][j]-1); if (result != 0x1ff) { return false; } } return true; }

Anonymous

Feb 21, 2012

write loops to test it