Skip to content

Conversation

@johar-inderpreet
Copy link

Implemented Backtracking-3

@super30admin
Copy link
Owner

  • NQueens: The solution is mostly correct, but the early return for n < 4 is unnecessary. The problem should handle all n >= 1, even if some cases have no solutions. This makes the solution more general and correct for all inputs.
  • WordSearch: The solution is well-implemented and efficient. One minor improvement could be to use a visited matrix instead of modifying the board, but this is a trade-off between space and time complexity.
  • Both solutions are well-structured and readable. Good use of helper methods and descriptive variable names.

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.

2 participants