[18/3/13]每天一道算法题:【N皇后问题】解析

82 阅读1分钟

一、问题描述

The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.

二、解析

N皇后一般由深搜实现,深搜为回溯思想,回溯可由递归和迭代实现;