Skip to content

the Knight's tour problems#40

Open
Gandhi9381 wants to merge 1 commit into
Tanujkumar70:masterfrom
Gandhi9381:master
Open

the Knight's tour problems#40
Gandhi9381 wants to merge 1 commit into
Tanujkumar70:masterfrom
Gandhi9381:master

Conversation

@Gandhi9381
Copy link
Copy Markdown

Your isSafe lambda had an unclosed bracket and an extra n parameter that wasn’t needed, since n is already accessible from the outer scope.

Before:

function<bool(int, int, int)> isSafe = [&](int x, int y, int n) {
return (x >= 0 && y >= 0 && x < n && y < n && board[x][y] == -1);
fix the code
};

After:

auto isSafe = [&](int x, int y) -> bool {
return (x >= 0 && y >= 0 && x < n && y < n && board[x][y] == -1);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant