Sudoku: Difference between revisions
Content added Content deleted
(→Functional Recursive Backtrack Solution: Greatly simplified Solve()) |
m (→Functional Recursive Backtrack Solution: Formatting) |
||
Line 1,885: | Line 1,885: | ||
var report = grid.Solve(0, 0) switch { |
var report = grid.Solve(0, 0) switch { |
||
true => |
|||
Range(0, 9) |
|||
.Select(r => Range(0, 9).Select(c => grid[r][c]).Fwd(string.Concat)) |
|||
.Fwd(s => string.Join('\n', s)), |
|||
_ => |
|||
"No Solution\n" |
|||
}; |
|||
Write(report); |
Write(report); |
||
ReadLine(); |
ReadLine(); |