摘要: java实现八皇后问题 代码实现 public class Demo { int max = 8; int[] arr = new int[max]; static int count = 0; public static void main(String[] args) { Demo demo = 阅读全文
posted @ 2022-03-30 16:07 CoderCatIce 阅读(65) 评论(0) 推荐(0) 编辑
摘要: java实现迷宫回溯问题 代码实现 public class Demo { public static void main(String[] args) { // 创建一个二维数组,模拟迷宫 int[][] map = new int[8][7]; // 使用1表示墙 // 上下 for (int 阅读全文
posted @ 2022-03-30 13:45 CoderCatIce 阅读(71) 评论(0) 推荐(0) 编辑