摘要
回溯算法是基本的算法之一,其重要的思想是不断地用限界函数去测试正在构造的部分解向量,看是否导致合法解,回溯算法通常具有较高的时间复杂度,但对于至今除了穷尽搜索仍未找到其他的方法的问题,回溯算法是较为有效的方法。介绍了回溯算法,以及以经典的N皇后问题为例,讲解了用回溯算法求解问题,并分析了其空间复杂度,介绍了求解N皇后问题的改进回溯算法。
出处
《电脑编程技巧与维护》
2016年第12期15-16,34,共3页
Computer Programming Skills & Maintenance