Skip to content

Commit ccde28b

Browse files
authored
Improved task 36
1 parent 7f8f9d4 commit ccde28b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

LeetCodeNet/G0001_0100/S0036_valid_sudoku/Solution.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
using System.Collections.Generic;
2-
31
namespace LeetCodeNet.G0001_0100.S0036_valid_sudoku {
42

53
// #Medium #Top_Interview_Questions #Array #Hash_Table #Matrix #Data_Structure_I_Day_5_Array
64
// #Top_Interview_150_Matrix #2025_06_30_Time_1_ms_(98.25%)_Space_48.16_MB_(85.00%)
75

6+
using System.Collections.Generic;
7+
88
public class Solution {
99
public bool IsValidSudoku(char[][] board) {
1010
bool[,] rows = new bool[9, 9];
@@ -15,13 +15,11 @@ public bool IsValidSudoku(char[][] board) {
1515
if (!isValidCase(board, i, j, rows, cols, blocks)) {
1616
return false;
1717
}
18-
1918
if (i != j && !isValidCase(board, j, i, rows, cols, blocks)) {
2019
return false;
2120
}
2221
}
2322
}
24-
2523
return true;
2624
}
2725

0 commit comments

Comments
 (0)