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

Problem Description

Given an integer n, return the number of distinct solutions to the n-queens puzzle.

Example:

Input: 4
Output: 2
Explanation: There are two distinct solutions to the 4-queens puzzle as shown below.
[
 [".Q..",  // Solution 1
  "...Q",
  "Q...",
  "..Q."],

 ["..Q.",  // Solution 2
  "Q...",
  "...Q",
  ".Q.."]
]

See the full details of the problem N Queens II at LeetCode

Originally posted at: @github.com/halfrost/LeetCode-Go