#include using namespace std; struct Point { int x; int y; }; // An Data Structure for queue used in BFS struct queueNode { Point pt; // The cordinates of a cell int dist; // cell's distance of from the source string path; }; bool valid(int row, int col,int ROW,int COL) { return (row >= 0) && (row < ROW) && (col >= 0) && (col < COL); } int rowNum[] = {-2, -2, 0, 2,2,0}; int colNum[] = {-1, 1, 2, 1,-1,-2}; void printShortestPath(int n,Point src,Point dest ) { bool visited[n][n]; memset(visited, false, sizeof visited); visited[src.x][src.y] = true; queue q; queueNode s = {src, 0}; q.push(s); int c=0; while (!q.empty()) { queueNode curr = q.front(); Point pt = curr.pt; //string str= curr.path; if (pt.x == dest.x && pt.y == dest.y) {cout<> n; int i_start; int j_start; int i_end; int j_end; cin >> i_start >> j_start >> i_end >> j_end; Point src= {i_start,j_start}; Point dest= {i_end,j_end}; printShortestPath(n, src,dest); return 0; }