Company: Agoda_20april
Difficulty: medium
HackerMan Maze Navigation Problem Description A maze is an n x m grid. Each cell is either empty ( 0 ) or contains an obstacle ( 1 ). Rows are numbered 0 to n-1 from top to bottom and columns 0 to m-1 from left to right, so cell (i, j) is row i , column j . HackerMan starts at cell (0, 0) and must reach cell (n-1, m-1) . He has a jump parameter k , and in one move he may go from (i, j) to: Right: (i, j+x) where 1 <= x <= k Down: (i+x, j) where 1 <= x <= k Left: (i, j-x) where 1 <= x <= k Up: (i-x, j) where 1 <= x <= k For any move, all cells in the path must be obstacle-free and within the maze boundaries. That is, every one of the x cells passed over, including the cell where the move ends, must be inside the grid and empty. Determine the minimum number of moves required to reach the destination, or return -1 if it is impossible. Function Description Complete the function getMinimumMoves in the editor with the following parameters: int maze[n][m] : the maze whe