自己写的八皇后递归算法演示程序,c#编写,图形展示,可以学习一下递归算法
结果打印举例如下:
2:1 6 8 3 7 4 2 5
+---+---+---+---+---+---+---+---+
| | | O | | | | | |
+---+---+---+---+---+---+---+---+
| | | | | O | | | |
+---+---+---+---+---+---+---+---+
| | O | | | | | | |
+---+---+---+---+---+---+---+---+
| | | | | | | | O |
+---+---+---+---+---+---+---+---+
| | | | | | O | | |
+---+---+---+---+---+---+---+---+
| | | | O | | | | |
+---+---+---+---+---+---+---+---+
| | | | | | | O | |
+---+---+---+---+---+---+---+---+
| O | | | | | | | |
+---+---+---+---+---+---+---+---+
1