Placing N Queen in a matrix

easy
Matrix problem solved with backtracking
 1. Take as input N,the size of a chess board
 2. We are asked to place N number of queens in it
 3. No queen can kill each other
 4. Write a recursive function which prints all valid configurations
 5. Void is the return type for function

Input Format

input id handled for you.This is a functional problem String will be input

Output Format

Each output in next line

Constraints

1 <= N <= 50

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.
Previous
Exit Point of a matrix
Next
Arranging Vowels And Consonants

Related Questions