I need to develop and implement the algorithm that will produce the path existing in between the first pixel and the last pixel.
INPUT:line 1 the size of the grid is