Company: Amazon HackOn
Difficulty: medium
In the land of Eldoria, there is a mystical maze represented as a grid with M rows and N columns. Each cell in this grid has an associated energy cost required to traverse it. You are an adventurer starting at the top-left corner of the maze and aiming to reach the bottom-right corner. However, you must be mindful of your limited energy supply, denoted by E . Your task is to determine whether it is possible to reach the bottom-right corner of the maze without exhausting your energy supply. Note: You can only go down OR right from your current cell. Also remember that you can't go out of the grid. Input Format The first line contains an integer M which indicates the number of rows in the grid. The second line contains an integer N which indicates the number of columns in the grid. The third line contains an integer E which indicates the maximum energy available. The next M lines each contain N space-separated integers representing the energy cost to traverse each cell in the grid. Outpu