lua programming (4th edition) Chapter Exercises

Exercise 2.1: Eight Queens modify the program in question, it is not running in output after the first solution.

Solution: To make it a solution to return, must first obtain a solution, then back or stop running

Exercise 2.2: Another way to solve the eight queens problem is that all permutations between Mr. Cheng 1-8, followed by traversing these arrangements, check each arrangement is a valid solution of the problem of the eight queens Use this method to modify. program, and to compare the performance difference between the old program and the new program.

Guess you like

Origin www.cnblogs.com/xiaxquan/p/12079451.html
Recommended