Sudoku: Difference between revisions

m
Line 1,839:
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static int RowCol(int rc) => rc <= 2 ? 0 : rc <= 5 ? 3 : 6;
private static IEnumerable<int> GetBox(this int[][] grid, int row, int col) =>
from r in Range(RowCol(row), 3)
from c in Range(RowCol(col), 3)
Line 1,866:
grid[row]
.Union(domain.Select(r => grid[r][col]))
.Union(grid.GetBox(grid, row, col))
.Except(Unmarked);