计算机与现代化 ›› 2011, Vol. 1 ›› Issue (3): 15-16,2.doi: 10.3969/j.issn.1006-2475.2011.03.005

• 人工智能 • 上一篇    下一篇

N皇后问题的Java程序实现及分析

吴红萍   

  1. 西北师范大学数学与信息科学学院,甘肃 兰州 730070
  • 收稿日期:2010-12-17 修回日期:1900-01-01 出版日期:2011-03-18 发布日期:2011-03-18

Implementation and Analysis of N Queens Problem with Java Language

WU Hong-ping   

  1. College of Mathematics and Information Science, Northwest Normal University, Lanzhou 730070, China
  • Received:2010-12-17 Revised:1900-01-01 Online:2011-03-18 Published:2011-03-18

摘要: 利用一种简易的回溯算法,给出Java语言实现N皇后问题的完整程序,并在程序中准确地统计程序运行的时间开销。

关键词: N皇后问题, 回溯算法, Java语言

Abstract: This paper uses a simplicity backtracking algorithm, presents a complete Java program for N queens problem, and the time cost about this program is exactly counted.

Key words: N queens problem, backtracking algorithm, Java language

中图分类号: