Here is my answer to valid sudoku problem, but it gets time limit exceeded error. Could someone help me to understand where is my problem please? Thanks.

```
public class Solution {
public boolean isValidSudoku(char[][] board) {
Set singleSet = new HashSet<>();
for (int i=0; i<9; i++)
{
singleSet.clear();
for (int j=0; j<9; j++)
{
if ((board[i][j]!='.') && (!singleSet.add(board[i][j])))
return false;
}
singleSet.clear();
for (int j=0; j<9; j++)
{
if ((board[j][i]!='.') && (!singleSet.add(board[j][i])))
return false;
}
singleSet.clear();
for (int j=0; j<9; j++)
{
if ((board[i/3*3+j/3][i%3*3+j%3]!='.') && (!singleSet.add(board[i/3*3+j/3][i%3*3+j%3])))
return false;
}
}
return true;
}
}
```