Solving N Queens in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description


Input: 4
Output: [
 [".Q..",  // Solution 1

 ["..Q.",  // Solution 2
Explanation: There exist two distinct solutions to the 4-queens puzzle as shown above.

See the full details of the problem N Queens at LeetCode

Originally posted at: