From dd3c92f6f789931c260408869b17eba05587f4b5 Mon Sep 17 00:00:00 2001 From: Trianta <56975502+Trimutex@users.noreply.github.com> Date: Fri, 3 Nov 2023 01:01:28 -0500 Subject: [PATCH] Minor final check performance increase --- src/sudoku.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sudoku.cpp b/src/sudoku.cpp index 782bfc6..3e6c1bf 100644 --- a/src/sudoku.cpp +++ b/src/sudoku.cpp @@ -30,8 +30,8 @@ void Sudoku::Solve(void) { bool Sudoku::IsBoardSolved(void) { int row, column; - for (row = 0; row < 9; ++row) { - for (column = 0; column < 9; ++column) { + for (row = 0; row < 9; row += 3) { + for (column = 0; column < 9; column += 3) { if (!GetUnusedRow(row).empty()) { return false; } if (!GetUnusedColumn(column).empty()) { return false; } if (!GetUnusedSubgrid(row, column).empty()) { return false; }