logo
Interview
    Interview Guide
    Coding Problems List
Sponsored: Coursera
Problems

N-Queens II

Problem

Follow up for N-Queens problem.

Now, instead outputting board configurations, return the total number of distinct solutions.

Example

For n=4, there are 2 distinct solutions.

Online Judge