N-Queens II
摘要:
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions. 1 public class Solution { 2 int result = 0; 3 public int totalNQueens(int n) { 4 // Start typing your Java solution below 5 // DO NOT write main() funct... 阅读全文
posted @ 2014-01-08 05:43 Step-BY-Step 阅读(177) 评论(0) 推荐(0) 编辑