摘要
采用回溯法来解决八皇后问题,用一种较好的数据类型来表示解空间,给出一种逻辑结构非常清晰的非递归算法,解决了递归算法中空间效率低的问题。
This paper uses backtracking method to solve the eight-queens puzzle,uses a better data type to express the solution space and gives a complete new nonrecursive algorithm which has a very clear logical structure.The algorithm solves the inherent difficulty in the recursive algorithm whose space efficiency is very low.
出处
《计算机与现代化》
2004年第5期10-11,16,共3页
Computer and Modernization