BFS(Java) 通过队列进行广度遍历,然后保存坐标和父节点 DFS(Java) 递归 + 回溯 import java.util.*; class Node{ public int x,y,step; Node fa; Node(){} Node(int x,int y,int step){ this.x = x; this.y = y; this.step = step; } Node(int x,int y,int step,Node fa){ this.x = x;...