Skip to content

Create N-Queens.cpp#60

Open
hg9336099029 wants to merge 1 commit intoSjxSubham:mainfrom
hg9336099029:patch-1
Open

Create N-Queens.cpp#60
hg9336099029 wants to merge 1 commit intoSjxSubham:mainfrom
hg9336099029:patch-1

Conversation

@hg9336099029
Copy link

🐝 Hacktoberfest Contribution – N-Queens II in C++

The N-Queens II problem is a famous backtracking challenge where the goal is to count the number of valid ways to place n queens on an n × n chessboard such that no two queens attack each other. Unlike the standard N-Queens problem, here we only need the total number of distinct solutions, not the actual board layouts.

As part of Hacktoberfest, this repository is dedicated to solving the N-Queens II problem using C++ only. Contributors can:

📝 Add different C++ implementations (recursive backtracking, bitmasking, etc.)

⚡ Optimize existing C++ solutions for faster execution.

📚 Improve readability with comments, clear variable names, and explanations.

✅ Add sample test cases for various values of n.

The objective is to create a comprehensive C++-only resource for N-Queens II, helping learners understand recursion, backtracking, and optimization techniques in C++.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for raising the PR, the owner will be review it soon' keep patience, keep contributing>>>!!! make sure you have star ⭐ the repo

@SjxSubham
Copy link
Owner

@hg9336099029

Maintain PR description format...
raise only valid PR, mention this solution solves which problem of leetcode (also share the problem ID as well)
for reference checkout previously merged PR

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