Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed indentation #2097

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 66 additions & 66 deletions Code/C++/n_queen_problem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,96 +118,96 @@ int main(){
return 0;
}
/*
TEST CASE 1:
INPUT: 4
OUTPUT:
TEST CASE 1:
INPUT: 4
OUTPUT:

* Q * *
* * * Q
Q * * *
* * Q *
* Q * *
* * * Q
Q * * *
* * Q *


* * Q *
Q * * *
* * * Q
* Q * *
* * Q *
Q * * *
* * * Q
* Q * *

TEST CASE 2:
INPUT: 5
OUTPUT:
TEST CASE 2:
INPUT: 5
OUTPUT:

Q * * * *
* * Q * *
* * * * Q
* Q * * *
* * * Q *
Q * * * *
* * Q * *
* * * * Q
* Q * * *
* * * Q *


Q * * * *
* * * Q *
* Q * * *
* * * * Q
* * Q * *
Q * * * *
* * * Q *
* Q * * *
* * * * Q
* * Q * *


* Q * * *
* * * Q *
Q * * * *
* * Q * *
* * * * Q
* Q * * *
* * * Q *
Q * * * *
* * Q * *
* * * * Q


* Q * * *
* * * * Q
* * Q * *
Q * * * *
* * * Q *
* Q * * *
* * * * Q
* * Q * *
Q * * * *
* * * Q *


* * Q * *
Q * * * *
* * * Q *
* Q * * *
* * * * Q
* * Q * *
Q * * * *
* * * Q *
* Q * * *
* * * * Q


* * Q * *
* * * * Q
* Q * * *
* * * Q *
Q * * * *
* * Q * *
* * * * Q
* Q * * *
* * * Q *
Q * * * *


* * * Q *
Q * * * *
* * Q * *
* * * * Q
* Q * * *
* * * Q *
Q * * * *
* * Q * *
* * * * Q
* Q * * *


* * * Q *
* Q * * *
* * * * Q
* * Q * *
Q * * * *
* * * Q *
* Q * * *
* * * * Q
* * Q * *
Q * * * *


* * * * Q
* Q * * *
* * * Q *
Q * * * *
* * Q * *
* * * * Q
* Q * * *
* * * Q *
Q * * * *
* * Q * *


* * * * Q
* * Q * *
Q * * * *
* * * Q *
* Q * * *
* * * * Q
* * Q * *
Q * * * *
* * * Q *
* Q * * *

TIME COMPLEXITY: O(N!) (N is the user input, that is the number of queens to be placed on a N X N chessboard)
SPACE COMPLEXITY: O(N^2)
TIME COMPLEXITY: O(N!) (N is the user input, that is the number of queens to be placed on a N X N chessboard)
SPACE COMPLEXITY: O(N^2)
*/


Expand Down