import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { class cell { int i; int j; int steps; String path; cell(int i,int j, int steps,String path) { this.i=i; this.j=j; this.steps=steps; this.path=path; } } void printShortestPath(int n, int i_start, int j_start, int i_end, int j_end) { // Print the distance along with the sequence of moves. // i and j direction, where a knight can move int di[] = {-2, -2, 0, 2, 2, 0}; int dj[] = {-1, 1, 2, 1, -1, -2}; String[] path = {"UL ", "UR ", "R ", "LR ", "LL ", "L "}; StringBuffer result = new StringBuffer(); Queue q =new LinkedList(); cell start=new cell(i_start,j_start,0,""); q.add(start); cell temp; boolean[][] visited = new boolean[n][n]; for(int i=0;i=0 && i=0 && j