In this task, we need to find a path from the upper left corner to the lower right corner of a matrix such that we never visit a location that contains an integer we have previously visited. The matrix consists of positive integers under 1000. We can move by stepping right, down, or left (provided that we do not go outside the matrix). Write a method that takes an integer matrix as an input parameter and returns true if a path exists and false if it does not. For full points, you should use an efficient backtracking algorithm to solve the problem (you can also earn 2 points with other solutions). You will find a template in P/HI1029/assignment4. It is okay if the method modifies the matrix during the process. (4 points)
Using for axample the following matrix:
int[][] maze = {{31,32,33,34,37,11,36},
{32,33,35,26,35,36,39},
{31,32,13,32,31,37,37},
{11,39,13,14,15,16,17},
{18,19,33,32,31,32,33},
{16,38,21,22,23,24,25}};