Unable to find count of solutions to the N queens problem

I used a global variable to store count and instead of returning true in the base case i returned false so that i can find other solutions as well instead of stopping at first soln.
But instead of 2, my answer is 7 and i cant figure out the issue.

share you code using cb ide so that i can look @HarmanHps

@HarmanHps corrected and commented

1 Like